Part Number Hot Search : 
30102 30102 MBR102 SM560B RJP6065 STM32 MBR102 TDA2030
Product Description
Full Text Search
 

To Download MRF24J40MA Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 2010 microchip technology inc. preliminary ds39776c mrf24j40 data sheet ieee 802.15.4? 2.4 ghz rf transceiver downloaded from: http:///
ds39776c-page 2 preliminary ? 2010 microchip technology inc. information contained in this publication regarding device applications and the like is prov ided only for your convenience and may be superseded by updates. it is your responsibility to ensure that your application me ets with your specifications. microchip makes no re presentations or warranties of any kind whether express or implied, written or oral, statutory or otherwise, related to the information, including but not limited to its condition, quality, performance, merchantability or fitness for purpose . microchip disclaims all liability arising from this information and its use. use of microchip devices in life support and/or safe ty applications is entirely at the buyers risk, and the buyer agrees to defend, indemnify and hold harmless microchip from any and all damages, claims, suits, or expenses resulting fr om such use. no licenses are conveyed, implicitly or ot herwise, under any microchip intellectual property rights. trademarks the microchip name and logo, th e microchip logo, dspic, k ee l oq , k ee l oq logo, mplab, pic, picmicro, picstart, pic 32 logo, rfpic and uni/o are registered trademarks of microchip technology incorporated in the u.s.a. and other countries. filterlab, hampshire, hi-tech c, linear active thermistor, mxdev, mxlab, seeval and the embedded control solutions company are register ed trademarks of microchip technology incorporated in the u.s.a. analog-for-the-digital age, a pplication maestro, codeguard, dspicdem, dspicdem.net, dspicworks, dsspeak, ecan, economonitor, fansense, hi-tide, in-circuit serial programming, icsp, mindi, mi wi, mpasm, mplab certified logo, mplib, mplink, mtouch, octopus, omniscient code generation, picc, picc-18, picdem, picdem.net, pickit, pictail, real ice, rflab, select mode, total endurance, tsharc, uniwindriver, wiperlock and zena are trademarks of microchip te chnology incorporated in the u.s.a. and other countries. sqtp is a service mark of mi crochip technology incorporated in the u.s.a. all other trademarks mentioned herein are property of their respective companies. ? 2010, microchip technology incorporated, printed in the u.s.a., all rights reserved. printed on recycled paper. isbn: 978-1-60932-459-9 note the following details of the code protection feature on microchip devices: microchip products meet the specification cont ained in their particular microchip data sheet. microchip believes that its family of products is one of the mo st secure families of its kind on the market today, when used i n the intended manner and under normal conditions. there are dishonest and possibly illegal me thods used to breach the code protection feature. all of these methods, to our knowledge, require using the microchip products in a manner outsi de the operating specifications contained in microchips data sheets. most likely, the person doing so is engaged in theft of intellectual property. microchip is willing to work with the customer who is concerned about the integrity of their code. neither microchip nor any other semico nductor manufacturer can guarantee the security of their code. code protection does not mean that we are guaranteeing the product as unbreakable. code protection is constantly evolving. we at microchip are committed to continuously improving the code protection features of our products. attempts to break microchips code protection featur e may be a violation of the digi tal millennium copyright act. if such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that act. microchip received iso/ts-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in chandler and tempe, arizona; gresham, oregon and design centers in california and india. the companys quality system processes and procedures are for its pic ? mcus and dspic ? dscs, k ee l oq ? code hopping devices, serial eeproms, microper ipherals, nonvolatile memory and analog products. in addition, microchips quality system for the design and manufacture of development systems is iso 9001:2000 certified. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 3 mrf24j40 features: ieee 802.15.4? standard compliant rf transceiver supports zigbee ? , miwi?, miwi p2p and proprietary wireless networking protocols simple, 4-wire serial peripheral interface (spi) integrated 20 mhz and 32.768 khz crystal oscillator circuitry low-current consumption: - rx mode: 19 ma (typical) - tx mode: 23 ma (typical) -sleep: 2 a (typical) small, 40-pin leadless qfn 6x6 mm 2 package rf/analog features: ism band 2.405-2.48 ghz operation data rate: 250 kbps (ieee 802.15.4); 625 kbps (turbo mode) -95 dbm typical sensitivity with +5 dbm maximum input level +0 dbm typical output power with 36 db tx power control range differential rf input/output with integrated tx/rx switch integrated low phase noise vco, frequency synthesize r and pll loop filter digital vco and filter calibration integrated rssi adc and i/q dacs integrated ldo high receiver and rssi dynamic range mac/baseband features: hardware csma-ca mechanism, automatic acknowledgement response and fcs check independent beacon, transmit and gts fifo supports all cca modes and rssi/ed automatic packet retransmit capability hardware security engine (aes-128) with ctr, ccm and cbc-mac modes supports encryption and decryption for mac subl ayer and upper layer pin diagram: 40-pin qfn 23 4 5 6 17 v dd rfp rfn v dd v dd gnd gpio0 mrf24j40 89 gpio1 gpio5 10 gpio4 12 13 14 15 16 11 17 gpio2gpio3 reset gnd wake int sdo 18 19 sdi sck 20 cs 2928 27 26 25 3024 ncnc lposc1 lposc2 nc gnd gnd 2322 ncgnd 21 v dd 32 33 34 35 36 31 37 v dd v dd osc2 osc1 v dd gnd v dd 38 39 nc v dd 40 lcap note: backside center pad is gnd. ieee 802.15.4 ? 2.4 ghz rf transceiver downloaded from: http:///
mrf24j40 ds39776c-page 4 preliminary ? 2010 microchip technology inc. 1.0 overview .................................................................................................................... .................................................................. 5 2.0 hardware description............................................................................................................... .................................................... 7 3.0 functional description...................................................................................................... ........ .................................................. 89 4.0 applications .............................................................................................................................. ................................................ 135 5.0 electrical characteristics .......................................................................................................... ................................................ 141 6.0 packaging information.............................................................................................................. ................................................ 145 appendix a: revision history............................................................................................................. ................................................ 147 index ............................................................................................................................. ..................................................................... 149 the microchip web site ......................................................................................................... ............ ................................................ 153 customer change notification service .............................................................................................. ................................................ 153 customer support .............................................................................................................................. ................................................ 153 reader response ................................................................................................................ .............. ................................................ 154 product identification system.................................................................................................. ........... ................................................ 155 to our valued customers it is our intention to provide our valued customers with the best documentation possible to ensure successful use of your micro chip products. to this end, we will continue to improve our publicat ions to better suit your needs. our publications will be refined and enhanced as new volumes and updates are introduced. if you have any questions or comments regard ing this publication, please cont act the marketing communications department via e-mail at docerrors@microchip.com or fax the reader response form in the back of this data sheet to (480) 792-4150. we welcome your feedback. most current data sheet to obtain the most up-to-date version of this data s heet, please register at our worldwide web site at: http://www.microchip.com you can determine the version of a data sheet by examining its liter ature number found on the bottom outside corner of any page . the last character of the literature number is the vers ion number, (e.g., ds30000a is version a of document ds30000). errata an errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for curren t devices. as device/documen tation issues become known to us, we will publish an errata sheet. the errata will specify the revisi on of silicon and revision of document to which it applies. to determine if an errata sheet exists for a partic ula r device, please check with one of the following: microchips worldwide web site; http://www.microchip.com your local microchip sales office (see last page) when contacting a sales office, please spec ify which device, revision of silicon and dat a sheet (include literature number) you are using. customer notification system register on our web site at www.microchip.com to receive the most current information on all of our products. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 5 mrf24j40 1.0 overview the mrf24j40 is an ieee 802.15.4? standard com - pliant 2.4 ghz rf transceiver. it integrates the phy and mac functionality in a single chip solution. figure 1-1 shows a simplified block diagram of a mrf24j40 wireless node. the mrf24j40 creates a low-co st, low-power, low data rate (250 or 625 kbps) wireless personal area network (wpan) device. the mrf24j40 interfaces to many popular microchip pic ? microcontrollers via a 4-wire serial spi interface, interrupt, wake and reset pins. the mrf24j40 provides hardware support for: energy detection carrier sense three cca modes csma-ca algorithm automatic packet retransmission automatic acknowledgment independent transmit, b eacon and gts fifo buffers security engine supports encryption and decryption for mac sublayer and upper layer these features reduce the processing load, allowing the use of low-cost 8-bit microcontrollers. the mrf24j40 is compatible with microchip's z igbee ? , miwi? and miwi p2p software stacks. each software stack is available as a free download, includ - ing source code, from the microchip web site: http://www.microchip.com/wireless. figure 1-1: wireless node block diagram matching circuitry antenna i/o sdo sdi sck intx i/o i/o pic ? mcu phy mac 20 mhz crystal interface sdi sdo sck int wake cs reset rfp rfn mrf24j40 power management memory downloaded from: http:///
mrf24j40 ds39776c-page 6 preliminary ? 2010 microchip technology inc. 1.1 ieee 802.15.4-2003 standard the mrf24j40 is compliant with the ieee 802.15.4?-2003 standard. the standard speci - fies the physical (phy) and media access controller (mac) fu nctions that form the basis for a wireless net - work device. figure 1-2 shows the structure of the phy packet and mac frame. it is highly recommended that the design engineer be famili ar with the ieee 802 .15.4-2003 standard in order to best understand the confi guration and operation of the mrf24j40. the standard can be downloaded from the ieee web site: http://www.ieee.org. figure 1-2: ieee 802.15.4? phy packet and mac frame structure preamble sfd 41 frame length shr phr 1 phy layer 2 1 4 or 10 superframe specification 2 gts fields k pending address fields m beacon payload n msdu mfr mac sublayer beacon frame 2 1 4 to 20 data payload n msdu mac sublayer data frame 2 1 4 to 20 command payload n msdu mac sublayer mac command frame command type 1 phy payload psdu mhr mhrmhr frame control adressing fields frame control adressing fields frame control adressing fields sequence number sequence number sequence number ppdu octets 5 C 127 fcs 2 mfr fcs 2 mfr fcs 2 octets octets octets 2 1 mac sublayer acknowledgment frame mhr frame control sequence number mfr fcs 2 octets on air packet downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 7 mrf24j40 2.0 hardware description 2.1 2.1 overview the mrf24j40 is an ieee 802.15.4 standard compliant 2.4 ghz rf transceiver. it integrates the phy and mac functionality in a single chip solution. figure 2-1 is a block diagram of the mrf24j40 circuitry. a frequency synthesizer is clocked by an external 20 mhz crystal and generates a 2.4 ghz rf frequency. the receiver is a low-if architecture consisting of a low noise amplifier (lna), down conversion mixers, poly - phase channel filters and baseband limiting amplifiers with a receiver signal strength indicator (rssi). the transmitter is a direct conversion architecture with a 0 dbm maximum output (typical) and 36 db power control range. an internal transmit/receive (tr) switch combines the transmitter and receiver circuits into differential rfp and rfn pins. these pins are connected to impedance matching circuitry (balun) and antenna. an external power amplifier (pa) and/or lna can be controlled via the gpio pins. six general purpose input/output (gpio) pins can be configured for control or monitoring purposes. they can also be configured to control external pa/lna rf switches. the power management circuitry consists of an integrated low dropout (ldo) voltage regulator. the mrf24j40 can be placed into a very low-current (2 a typical) sleep mode. an internal 100 khz oscillator or 32 khz external crystal oscillator can be used for sleep mode timing. the media access controller (mac) circuitry verifies reception and formats for transmission ieee 802.15.4 standard compliant packets. data is buffered in trans - mit and receive fifos. carrier sense multiple access-collision avoidance (csma-ca), superframe constructor, receive frame filter and security engine functionality are implemented in hardware. the security engine provides hardware circuitry for aes-128 with ctr, ccm and cbc-mac modes. control of the transceiver is via a 4-wire spi, interrupt, wake and reset pins. downloaded from: http:///
mrf24j40 ds39776c-page 8 preliminary ? 2010 microchip technology inc. 2.2 block diagram figure 2-1: mrf24j40 architecture block diagram filter rssi adc adc adc rx baseband tx baseband dac dac frequency synthesizer rf phy mac fcs checker frame checker rxmac interrupts memory rxfifo security key fifo txnfifo txbfifo txg1fifo txg2fifo control registers lna pa fcs generator packet retriever superframe state machine csma-ca txmac interface spi gpio power management security engine 32 khz crystal oscillator sleep clock 100 khz internal oscillator 20mhz crystal oscillator 46 int wake reset downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 9 mrf24j40 2.3 pin descriptions table 2-1: mrf24j40 pin descriptions pin symbol type description 1 v dd power rf power supply. bypass with a capacitor as close to the pin as possible. 2 rfp aio differential rf input/output (+). 3 rfn aio differential rf input/output (-). 4 v dd power rf power supply. bypass with a capacitor as close to the pin as possible. 5 v dd power guard ring power supply. bypass with a capacitor as close to the pin as possible. 6 gnd ground guard ring ground. 7 gpio0 dio general purpose digital i/o, also used as external pa enable. 8 gpio1 dio general purpose digital i/o, also used as external tx/rx switch control. 9 gpio5 dio general purpose digital i/o. 10 gpio4 dio general purpose digital i/o. 11 gpio2 dio general purpose digital i/o, also used as external tx/rx switch control. 12 gpio3 dio general purpose digital i/o. 13 reset di global hardware reset pin active-low. 14 gnd ground ground for digital circuit. 15 wake di external wake-up trigger (must be enabled in software). 16 int do interrupt pin to microcontroller. 17 sdo do serial interface data output from mrf24j40. 18 sdi di serial interface data input to mrf24j40. 19 sck di serial interface clock. 20 cs di serial interface enable. 21 v dd power digital circuit power supply. bypass with a capacitor as close to the pin as possible. 22 gnd ground ground for digital circuit. 23 nc no connection. 24 gnd ground ground for digital circuit. 25 gnd ground ground for digital circuit. 26 nc no connection. (allow pin to float; do not connect signal.) 27 lposc2 ai 32 khz crystal input. 28 lposc1 ai 32 khz crystal input. 29 nc no connection. (allow pin to float; do not connect signal.) 30 nc no connection. (allow pin to float; do not connect signal.) 31 v dd power power supply for band gap reference circuit. bypass with a capacitor as close to the pin as possible. 32 v dd power power supply for analog circuit. bypass with a capacitor as close to the pin as possible. 33 osc2 ai 20 mhz crystal input. 34 osc1 ai 20 mhz crystal input. 35 v dd power pll power supply. bypass with a capacitor as close to the pin as possible. 36 gnd ground ground for pll. 37 v dd power charge pump power supply. bypass with a capa citor as close to the pin as possible. 38 nc no connection. 39 v dd power vco supply. bypass with a capacitor as close to the pin as possible. 40 lcap pll loop filter external capacitor. connected to external 100 pf capacitor. legend: a = analog, d = digital, i = input, o = output downloaded from: http:///
mrf24j40 ds39776c-page 10 preliminary ? 2010 microchip technology inc. 2.4 power and ground pins recommended bypass capacitors are listed in table 2-2 . v dd pins 1 and 31 require two bypass capacitors to ensure suffic ient bypass decoupling. min - imize trace length from the v dd pin to the bypass capacitors and make them as short as possible. table 2-2: recommended bypass capacitor values v dd pin bypass capacitor 1 47 pf and 0.01 f 4 47 pf 5 0.1 f 21 0.01 f 31 47 pf and 0.01 f 32 47 pf 35 47 pf 37 0.01 f 39 1 f 2.5 20 mhz main oscillator the 20 mhz main oscillator provides the main frequency (mainclk) signal to internal rf, baseband and mac circuitry. an external 20 mhz quartz crystal is connected to the osc1 and osc2 pins as shown in figure 2-2 . the crystal parameters are listed in table 2-3 . table 2-3: 20 mhz crystal parameters parameter value frequency 20 mhz frequency tolerance at 25c 20 ppm (2) frequency stability over operating temperature range 20 ppm (2) mode fundamental load capacitance 10-15 pf esr 80 max. note 1: these values are for design guidance only. 2: ieee 802 .15.4? standard specifies transmitted center frequency tolerance shall be 40 ppm maximum. (1) figure 2-2: 20 mhz main oscillator crystal circuit osc1 osc2 20 mhz main oscillator x1 cl2cl1 2.6 phase-locked loop the phase-locked loop (pll) circuitry requires one external capacitor connected to pin 40 (lcap). the recommended value is 100 pf. the pcb layout around the capacitor and pin 40 should be designed carefully such as to minimize interference to the pll. 2.7 32 khz external crystal oscillator the 32 khz external crystal os cillator provides one of two sleep clock (slpclk) frequencies to sleep mode counters. the sleep mode counters time the beacon interval (bi) and inactive period for a beacon-enabled device and the sleep interval for a nonbeacon-enabled device. refer to section 3.15 sleep for more information. the slpclk frequency is selectable between the 32 khz external crystal oscillator or 100 khz internal oscil - lator. the 32 khz external crystal oscillator provides be tter frequency accuracy and stability than the 100 khz internal oscillator. an external 32 khz tuning fork cryst al is connected to the lposc1 and lposc2 pins, as shown in figure 2-3 . the crystal parameters are listed in ta b l e 2-4 . table 2-4: 32 khz crystal parameters (1) parameter value frequency 32.768 khz frequency tolerance 20 ppm load capacitance 12.5 pf esr 70 k max. note 1: these values are for design guidance only. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 11 mrf24j40 figure 2-3: 32 khz external oscillator crystal circuit lposc1 lposc2 32 khz external crystal oscillator x2 cl22cl11 2.8 100 khz internal oscillator the 100 khz internal oscillator requires no external components and provides one of two sleep clock (slpclk) frequencies to sleep mode counters. the sleep mode counters time the beacon interval (bi) and inactive period for a beacon-enabled device and the sleep interval for a nonbeacon-enabled device. refer to section 3.15 sleep for more information. the slpclk frequency is selectable between the 32 khz external crystal oscilla tor or 10 0 khz internal oscillator. the 32 khz external crystal oscillator provides better frequency accuracy and stability than the 100 khz internal oscillator. it is recommended that the 100 khz internal oscillator be calibrated before use. the calibration procedure is given in section 3.15.1.2 sleep clock calibration . 2.9 reset ( reset ) pin an external hardware reset can be performed by asserting the reset pin 13 low. the mrf24j40 will be released from reset approximately 250 s after the reset pin is released. the reset pin has an internal weak pull-up resistor. 2.10 interrupt (int) pin the interrupt (int) pin 16 provides an interrupt signal to the host microcontroller from the mrf24j40. the polarity is configured via the intedge bit in the slpcon0 (0x211<1>) register. interrupts have to be enabled and unmasked before the int pin is active. refer to section 3.3 interrupts for a functional description of interrupts. note: the int pin will remain high or low, depending on intedge polarity setting, until instat register is read. note: the intedge polarity defaults to, 0 = falling edge. ensure that the interrupt pol arity matches the interrupt pin polarity on the host microcontroller. 2.11 wake (wake) pin the wake (wake) pin 15 provides an external wake-up signal to the mrf24j40 from the host micro - controller. it is used in conjunction with the sleep modes of the mrf24j40. the wake pin is disabled by default. refer to section 3.15.2 immediate sleep and wake-up mode for a functional description of the immediate sleep and wake-up modes. 2.12 general purpose input/output (gpio) pins six gpio pins can be configured individually for control or monitoring purposes. input or output selection is configured by the trisgpio (0x34) register. gpio data can be read/written to via the gpio (0x33) register. the gpio pins have limit ed output drive capability. table 2-5 lists the individual gpio pin source current limits. table 2-5: gpio source current limits pin maximum current sourced gpio0 4 ma gpio1 1 ma gpio2 1 ma gpio3 1 ma gpio4 1 ma gpio5 1 ma gpio0, gpio1 and gpio2 can be configured to control external p a, lna and rf switches by the internal rf state machine. this allows the external pa and lna to be controlled by the mrf24j40 without any host micro - controller intervention. refer to section 4.2 external pa/lna control for control register configuration, timing diagrams and application information. downloaded from: http:///
mrf24j40 ds39776c-page 12 preliminary ? 2010 microchip technology inc. 2.13 serial peripheral interface (spi) port pins the mrf24j40 communicates with a host micro - controller via a 4-wire spi port as a slave device. the mrf2 4j40 supports spi (mo de 0,0) which requires that sck idles in a low state. the cs pin must be held low while communicating with the mrf24j40. figure 2-4 shows timing for a write operation. data is received by the mrf24j40 via the sdi pin and is clocked in on the rising edge of sck. figure 2-5 shows timing for a read operation. data is sent by the mrf2 4j40 via the sdo pin and is clocked out on the falling edge of sck. note: the sdo pin 17 defaults to a low state when cs is high (the mrf24j40 is not selected). if the mrf24j40 is to share a spi bus, a tri-state buffer should be placed on the sdo signal to provide a high-impedance signal to the spi bus. see section 4.4 mrf24j40 schematic and bill of materials for an example application circuit. figure 2-4: spi port write (input) timing cs sck sdi sdo lsb msb figure 2-5: spi port read (output) timing cs sck sdo msb lsb sdi downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 13 mrf24j40 2.14 memory organization memory in the mrf24j40 is implemented as static ram and is accessible via the spi port. memory is functionally divided into control registers and data buf - fers (fifos), as shown in figure 2-6 . control registers provide control, status and device addressing for mrf2 4j40 operations. fifos serve as temporary buffers for data transmission, reception and security keys. memory is acce ssed via two addressing methods: short and long. figure 2-6: memory map for mrf24j40 tx beacon fifo control registers security key fifo rx fifo tx normal fifo tx gts1 fifo tx gts2 fifo 0x0000x07f 0x080 0x0ff 0x100 0x17f 0x180 0x1ff 0x27f 0x2000x280 0x2bf 0x300 0x38f long address short address memory space 0x00 0x3f reserved 0x2c00x2ff memory space 128 bytes128 bytes 128 bytes 128 bytes 128 bytes 64 bytes 144 bytes 64 bytes control registers downloaded from: http:///
mrf24j40 ds39776c-page 14 preliminary ? 2010 microchip technology inc. 2.14.1 short address register interface the short address memory space contains control registers with a 6-bit address range of 0x00 to 0x3f. figure 2-7 shows a short address read and figure 2-8 shows a short address write. the 8-bit spi transfer be gins with a 0 to indicate a short address transaction. it is followed by the 6-bit register address, most signif - icant bit (msb) first. the 8 th bit indicates if it is a read ( 0 ) or write ( 1 ) transaction. figure 2-7: sck sdi sdo cs a5 a4 a3 a2 a1 a0 d7 d6 d5 d4 d3 d2 d1 d0 x 00 short address read figure 2-8: sck sdi sdo cs a5 a4 a3 a2 a1 a0 0 1 d7 d6 d5 d4 d3 d2 d1 d0 short address write downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 15 mrf24j40 2.14.2 long ad dress register interface the long address memory space contains control registers and fifos with a 10-bit address range of 0x000 to 0x38f. figure 2-9 shows a long address read and figure 2-10 shows a long address write. the 12-bit spi transfer begins with a 1 to indicate a long address transaction. it is followed by the 10-bit register address, most significant bit (msb) first. the 12 th bit indicates if it is a read ( 0 ) or write ( 1 ) transaction. figure 2-9: sck sdi sdo cs a9 a8 a7 a6 a5 d7 d6 d5 d4 d3 d2 d1 d0 x a4 a3 a2 a1 a0 0 1 long address read figure 2-10: sck sdi sdo cs a9 a8 a7 a6 a5 d7 d6 d5 d4 d3 d2 d1 d0 x a4 a3 a2 a1 a0 1 1 long address write downloaded from: http:///
mrf24j40 ds39776c-page 16 preliminary ? 2010 microchip technology inc. 2.15 control register description control registers provide control, status and device addressing for mrf24j40 operations. the following figures, tables and register definitions describe the control register operation. 2.15.1 control register map figure 2-11: rxmcr 0x00 panidl 0x01 panidh 0x02 sadrl 0x03 sadrh 0x04 eadr0 0x05 eadr1 0x06 eadr2 0x07 eadr3 0x08 eadr4 0x09 eadr5 0x0a eadr6 0x0b eadr7 0x0c rxflush 0x0d reserved 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f reserved order txmcr acktmout eslotg1 symtickl symtickh pacon0 pacon1 pacon2 reserved txbcon0 txncon txg1con txg2con eslotg23 eslotg45 eslotg67 0x20 txpend 0x21 wakecon 0x22 frmoffset 0x23 txstat 0x24 txbcon1 0x25 gateclk 0x26 txtime 0x27 hsymtmrl 0x28 hsymtmrh 0x29 softrst 0x2a reserved 0x2b seccon0 0x2c seccon1 0x2d txstbl 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f reserved rxsr intstat intcon gpio trisgpio slpack rfctl seccr2 bbreg0 bbreg1 bbreg2 bbreg3 bbreg4 reserved bbreg6 ccaedth short address control register map for mrf24j40 figure 2-12: rfcon0 0x200 rfcon1 0x201 rfcon2 0x202 rfcon3 0x203 reserved 0x204 rfcon5 0x205 rfcon6 0x206 rfcon7 0x207 rfcon8 0x208 slpcal0 0x209 slpcal1 0x20a slpcal2 0x20b reserved 0x20c reserved 0x20d reserved 0x20e 0x20f 0x210 0x211 0x212 0x213 0x214 0x215 0x216 0x217 0x218 0x219 0x21a 0x21b 0x21c 0x21d 0x21e 0x21f rfstate rssi slpcon0 reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved slpcon1 0x220 reserved 0x221 waketimel 0x222 waketimeh 0x223 remcntl 0x224 remcnth 0x225 maincnt0 0x226 maincnt1 0x227 maincnt2 0x228 maincnt3 0x229 0x22a reserved 0x22b reserved 0x22c reserved 0x22d reserved 0x22e 0x22f ox230 0x231 0x232 0x233 0x234 0x235 0x236 0x237 0x238 0x239 0x23a 0x23b 0x23c 0x23d 0x23e 0x23f testmode assoeadr0 assosadr0 reserved reserved unimplemented unimplemented unimplemented unimplemented upnonce4 0x244 0x245 upnonce6 0x246 upnonce7 0x247 upnonce8 0x248 upnonce9 0x249 upnonce10 0x24a upnonce11 0x24b upnonce12 0x24c upnonce5 assoeadr1 assoeadr2 assoeadr3 assoeadr4 assoeadr5 assoeadr6 assoeadr7 assosadr1 reserved 0x240 0x241 0x242 0x243 upnonce0upnonce1 upnonce2 upnonce3 long address control regi ster map for mrf24j40 downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 17 mrf24j40 2.15.2 control register summary table 2-6: short address control register summary for mrf24j40 addr. file name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 value on por details on page: 0x00 rxmcr r r noackrsp r pancoord coord errpkt promi 0000 0000 22 0x01 panidl pan id low byte (panidl<7:0>) 0000 0000 23 0x02 panidh pan id high byte (panidh<15:8>) 0000 0000 23 0x03 sadrl short address low byte (sadrl<7:0>) 0000 0000 24 0x04 sadrh short address high byte (sadrh<15:8>) 0000 0000 24 0x05 eadr0 64-bit extended address bits (eadr0<7:0>) 0000 0000 25 0x06 eadr1 64-bit extended address bits (eadr1<15:8>) 0000 0000 25 0x07 eadr2 64-bit extended address bits (eadr2<23:16>) 0000 0000 25 0x08 eadr3 64-bit extended address bits (eadr3<31:24>) 0000 0000 26 0x09 eadr4 64-bit extended address bits (eadr4<39:32>) 0000 0000 26 0x0a eadr5 64-bit extended address bits (eadr5<47:40>) 0000 0000 26 0x0b eadr6 64-bit extended address bits (eadr6<55:48>) 0000 0000 27 0x0c eadr7 64-bit extended address bits (eadr7<63:56>) 0000 0000 27 0x0d rxflush r wakepol wakepad r cmdonly dataonly bcnonly rxflush 0000 0000 28 0x0e reserved r r r r r r r r 0000 0000 0x0f reserved r r r r r r r r 0000 0000 0x10 order bo3 bo2 bo1 bo0 so3 so2 so1 so0 1111 1111 29 0x11 txmcr nocsma batlifext slotted macminbe1 macminbe0 csmabf2 csmabf1 csmabf0 0001 1100 30 0x12 acktmout drpack mawd6 mawd5 mawd4 mawd3 mawd2 mawd1 mawd0 0011 1001 31 0x13 eslotg1 gts1-3 gts1-2 gts1-1 gts1-0 cap3 cap2 cap1 cap0 0000 0000 32 0x14 symtickl tickp7 tickp6 tickp5 tickp4 tickp3 tickp2 tickp1 tickp0 0100 0000 33 0x15 symtickh txont6 txont5 txont4 txont3 txont2 txont1 txont0 tickp8 0101 0001 33 0x16 pacon0 paont7 paont6 paont5 paont4 paont3 paont2 paont1 paont0 0010 1001 34 0x17 pacon1 r r r paonts3 paonts2 paonts1 paonts0 paont8 0000 0010 34 0x18 pacon2 fifoen r txonts3 txonts2 txonts1 txonts0 txont8 txont7 1000 1000 35 0x19 reserved r r r r r r r r 0000 0000 0x1a txbcon0 r r r r r r txbsecen txbtrig 0000 0000 36 0x1b txncon r r r fpstat indirect txnackreq txnsecen txntrig 0000 0000 37 0x1c txg1con txg1retry1 txg1retry0 txg1slot2 txg1slot1 txg1slot0 txg1ackreq txg1secen txg1trig 0000 0000 38 0x1d txg2con txg2retry1 txg2retry0 txg2slot2 txg2slot1 txg2slot0 txg2ackreq txg2secen txg2trig 0000 0000 38 legend: r = reserved downloaded from: http:///
mrf24j40 ds39776c-page 18 preliminary ? 2010 microchip technology inc. 0x1e eslotg23 gts3-3 gts3-2 gts3-1 gts3-0 gts2-3 gts2-2 gts2-1 gts2-0 0000 0000 39 0x1f eslotg45 gts5-3 gts5-2 gts5-1 gts5-0 gts4-3 gts4-2 gts4-1 gts4-0 0000 0000 39 0x20 eslotg67 r r r r gts6-3 gts6-2 gts6-1 gts6-0 0000 0000 39 0x21 txpend mlifs5 mlifs4 mlifs3 mlifs2 mlifs1 mlifs0 gtsswitch fpack 1000 0100 40 0x22 wakecon immwake regwake intl intl intl intl intl intl 0000 0000 41 0x23 frmoffset offset7 offset6 offset5 offset4 offset3 offset2 offset1 offset0 0000 0000 42 0x24 txstat txnretry1 txnretry0 ccafail txg2fnt txg1fnt txg2stat txg1stat txnstat 0000 0000 43 0x25 txbcon1 txbmsk wu /bcn rssinum1 rssinum0 r r r r 0011 0000 44 0x26 gateclk r r r r gtson r r r 0000 0000 45 0x27 txtime turntime3 turntime2 turntime1 turntime0 r r r r 0100 1000 46 0x28 hsymtmrl hsymtmr7 hsymtmr6 hsymtmr5 hsymtmr4 hsymtmr3 hsymtmr2 hsymtmr1 hsymtmr0 0000 0000 47 0x29 hsymtmrh hsymtmr15 hsymtmr14 hsymtmr13 hsymtmr12 hsymtmr11 hsymtmr10 hsymtmr09 hsymtmr08 0000 0000 47 0x2a softrst r r r r r rstpwr rstbb rstmac 0000 0000 48 0x2b reserved r r r r r r r r 0000 0000 0x2c seccon0 secignore secstart rxcipher2 rxcipher1 rxcipher0 txncipher2 txncipher1 txncipher0 0000 0000 49 0x2d seccon1 r txbcipher2 txbcipher1 txbcipher0 r r disdec disenc 0000 0000 50 0x2e txstbl rfstbl3 rfstbl2 rfstbl1 rfstbl0 msifs3 msifs2 msifs1 msifs0 0111 0101 51 0x2f reserved r r r r r r r r 0000 0000 table 2-6: short address control regist er summary for mrf 24j40 (continued) addr. file name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 value on por details on page: legend: r = reserved downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 19 mrf24j40 0x30 rxsr r upsecerr batind r r secdecerr r r 0000 0000 52 0x31 intstat slpif wakeif hsymtmrif secif rxif txg2if txg1if txnif 0000 0000 53 0x32 intcon slpie wakeie hsymtmrie secie rxie txg2ie txg1ie txnie 1111 1111 54 0x33 gpio r r gpio5 gpio4 gpio3 gpio2 gpio1 gpio0 0000 0000 55 0x34 trisgpio r r trisgp5 trisgp4 trisgp3 trisgp2 trisgp1 trisgp0 0000 0000 55 0x35 slpack slpack wakecnt6 wakecnt5 wakecnt4 wakecnt3 wakecnt2 wakecnt1 wakecnt0 0000 0000 56 0x36 rfctl r r r wakecnt8 wakecnt7 rfrst rftxmode rfrxmode 0000 0000 57 0x37 seccr2 updec upenc txg2cipher2 txg2cipher1 txg2cipher0 txg1cipher2 txg1cipher1 txg1cipher0 0000 0000 58 0x38 bbreg0 r r r r r r r turbo 0000 0000 59 0x39 bbreg1 r r r r r rxdecinv r r 0000 0000 59 0x3a bbreg2 ccamode1 ccamode0 ccacsth3 ccacsth2 ccacsth1 ccacsth0 r r 0100 1000 60 0x3b bbreg3 prevalidth3 prevalidth2 prevalidth1 prevalidth0 predetth2 predetth1 predetth0 r 1101 1000 60 0x3c bbreg4 csth2 csth1 csth0 precnt2 precnt1 precnt0 r r 1001 1100 61 0x3d reserved r r r r r r r r 0000 0000 0x3e bbreg6 rssimode1 rssimode2 r r r r r rssirdy 0000 0001 61 0x3f ccaedth ccaedth7 ccaedth6 ccaedth5 ccaedth4 ccaedth3 ccaedth2 ccaedth1 ccaedth0 0000 0000 62 table 2-6: short address control regist er summary for mrf24j40 (continued) addr. file name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 value on por details on page: legend: r = reserved table 2-7: long address control register summary for mrf24j40 addr. file name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 value on por details on page: 0x200 rfcon0 channel3 channel2 channel1 channel0 rfopt3 rfopt2 rfopt1 rfopt0 0000 0000 63 0x201 rfcon1 vcoopt7 vcoopt6 vcoopt5 vcoopt4 vcoopt3 vcoopt2 vcoopt1 vcoopt0 0000 0000 63 0x202 rfcon2 pllen r r r r r r r 0000 0000 64 0x203 rfcon3 txpwrl1 txpwrl0 txpwrs2 txpwrs1 txpwrs0 r r r 0000 0000 64 0x204 reserved r r r r r r r r 0000 0000 0x205 rfcon5 batth3 batth2 batth1 batth0 r r r r 0000 0000 65 0x206 rfcon6 txfil r r 20mrecvr baten r r r 0000 0000 65 0x207 rfcon7 slpclksel1 slpclksel0 r r r r clkoutmode1 clkoutmode0 0000 0000 66 0x208 rfcon8 r r r rfvco r r r r 0000 0000 66 0x209 slpcal0 slpcal7 slpcal6 slpcal5 slpcal4 slpcal3 slpcal2 slpcal1 slpcal0 0000 0000 67 0x20a slpcal1 slpcal15 slpcal14 slpcal13 slpcal12 slpcal11 slpcal10 slpcal9 slpcal8 0000 0000 67 0x20b slpcal2 slpcalrdy r r slpcalen slpcal19 slpcal18 slpcal17 slpcal16 0000 0000 68 0x20c reserved r r r r r r r r 0000 0000 0x20d reserved r r r r r r r r 0000 0000 0x20e reserved r r r r r r r r 0000 0000 0x20f rfstate rfstate2 rfstate1 rfstate0 r r r r r 0000 0000 69 0x210 rssi rssi7 rssi6 rssi5 rssi4 rssi3 rssi2 rssi1 rssi0 0000 0000 69 0x211 slpcon0 r r r r r r intedge slpclken 0000 0000 70 0x212 reserved r r r r r r r r 0000 0000 legend: r = reserved downloaded from: http:///
mrf24j40 ds39776c-page 20 preliminary ? 2010 microchip technology inc. 0x213 reserved r r r r r r r r 0000 0000 0x214 reserved r r r r r r r r 0000 0000 0x215 reserved r r r r r r r r 0000 0000 0x216 reserved r r r r r r r r 0000 0000 0x217 reserved r r r r r r r r 0000 0000 0x218 reserved r r r r r r r r 0000 0000 0x219 reserved r r r r r r r r 0000 0000 0x21a reserved r r r r r r r r 0000 0000 0x21b reserved r r r r r r r r 0000 0000 0x21c reserved r r r r r r r r 0000 0000 0x21d reserved r r r r r r r r 0000 0000 0x21e reserved r r r r r r r r 0000 0000 0x21f reserved r r r r r r r r 0000 0000 0x220 slpcon1 r r clkouten slpclkdiv4 slpclkdiv3 slpclkdiv2 slpclkdiv1 slpclkdiv0 0000 0000 70 0x221 reserved r r r r r r r r 0000 0000 0x222 waketimel waketime7 waketime6 waketime5 waketime4 waketime3 waketime2 waketime1 waketime0 0000 1010 71 0x223 waketimeh r r r r r waketime10 waketime9 waketime8 0000 0000 71 0x224 remcntl remcnt7 remcnt6 remcnt5 remcnt4 remcnt3 remcnt2 remcnt1 remcnt0 0000 0000 72 0x225 remcnth remcnt15 remcnt14 remcnt13 remcnt12 remcnt11 remcnt10 remcnt9 remcnt8 0000 0000 72 0x226 maincnt0 maincnt7 maincnt6 maincnt5 maincnt4 maincnt3 maincnt2 maincnt1 maincnt0 0000 0000 73 0x227 maincnt1 maincnt15 maincnt14 maincnt13 maincnt12 maincnt11 maincnt10 maincnt9 maincnt8 0000 0000 73 0x228 maincnt2 maincnt23 maincnt22 maincnt21 maincnt20 maincnt19 maincnt18 maincnt17 maincnt16 0000 0000 74 0x229 maincnt3 startcnt r r r r r maincnt25 maincnt24 0000 0000 74 0x22a reserved r r r r r r r r 0000 0000 0x22b reserved r r r r r r r r 0000 0000 0x22c reserved r r r r r r r r 0000 0000 0x22d reserved r r r r r r r r 0000 0000 0x22e reserved r r r r r r r r 0000 0000 0x22f testmode r r r rssiwait1 rssiwait0 testmode2 testmode1 testmode0 0000 0000 75 0x230 assoeadr0 assoeadr0<7:0> 0000 0000 76 0x231 assoeadr1 assoeadr1<15:8> 0000 0000 76 0x232 assoeadr2 assoeadr2<23:16> 0000 0000 77 0x233 assoeadr3 assoeadr3<31:24> 0000 0000 77 0x234 assoeadr4 assoeadr4<39:32> 0000 0000 78 0x235 assoeadr5 assoeadr5<47:40> 0000 0000 78 0x236 assoeadr6 assoeadr6<55:48> 0000 0000 79 0x237 assoeadr7 assoeadr7<63:56> 0000 0000 79 0x238 assosadr0 assosadr0<7:0> 0000 0000 80 0x239 assosadr1 assosadr1<15:8> 0000 0000 80 0x23a reserved r r r r r r r r 0000 0000 0x23b reserved r r r r r r r r 0000 0000 0x23c unimple - mented ---- ---- 0x23d unimple - mented ---- ---- 0x23e unimple - mented ---- ---- 0x23f unimple - mented ---- ---- 0x240 upnonce0 upnonce<7:0> 0000 0000 81 0x241 upnonce1 upnonce<15:8> 0000 0000 81 0x242 upnonce2 upnonce<23:16> 0000 0000 82 0x243 upnonce3 upnonce<31:24> 0000 0000 82 0x244 upnonce4 upnonce<39:32> 0000 0000 83 0x245 upnonce5 upnonce<47:40> 0000 0000 83 table 2-7: long address control register summary for mrf24j40 (continued) addr. file name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 value on por details on page: legend: r = reserved downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 21 mrf24j40 0x246 upnonce6 upnonce<55:48> 0000 0000 84 0x247 upnonce7 upnonce<63:56> 0000 0000 84 0x248 upnonce8 upnonce<71:64> 0000 0000 85 0x249 upnonce9 upnonce<79:72> 0000 0000 85 0x24a upnonce10 upnonce<87:80> 0000 0000 86 0x24b upnonce11 upnonce<95:88> 0000 0000 86 0x24c upnonce12 upnonce<103:96> 0000 0000 87 table 2-7: long address control regist er summary for mrf24j40 (continued) addr. file name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 value on por details on page: legend: r = reserved downloaded from: http:///
mrf24j40 ds39776c-page 22 preliminary ? 2010 microchip technology inc. 2.15.3 short ad dress control registers detail register 2-1: rxmcr: receive mac control r egister (address: 0x00) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r r noackrsp r pancoord coord errpkt promi bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-6 reserved: main tain as 0 bit 5 noackrsp: automatic acknowledgement response bit 1 = disables automatic acknowledgement response 0 = enables automatic acknowledg ement response. acknowledgements are returned when they are requested (default). bit 4 reserved: main tain as 0 bit 3 pancoord: pan coordinator bit 1 = set device as pan coordinator 0 = device is not set as pan coordinator (default) bit 2 coord: co ordinator bit 1 = set device as coordinator 0 = device is not set as coordinator (default) bit 1 errpkt: packet error mode bit 1 = accept all packets including those with crc error 0 = accept only packets with good crc (default) bit 0 promi: promiscuous mode bit 1 = receive all packet types with good crc 0 = discard packet when there is a mac address mismatch, illegal frame type, dpan/span or mac short address mismatch (default) downloaded from: http:///
register 2-2: panidl: pan id low byte register (address: 0x01) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pan id low byte (panidl<7:0>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 panidl<7:0>: p an id low byte bits register 2-3: panidh: pan id hi gh byte register (address: 0x02) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pan id high byte (panidh<15:8>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 panidh<15:8>: p an id high byte bits ? 2010 microchip technology inc. preliminary ds39776c-page 23 mrf24j40 downloaded from: http:///
register 2-4: sadrl: short address low byte register (address: 0x03) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 short address low byte (sadrl<7:0>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 sadrl<7:0>: short address low byte bits register 2-5: sadrh: short address high byte register (address: 0x04) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 short address high byte (sadrh<15:8>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 sadrh<15:8>: short address high byte bits mrf24j40 ds39776c-page 24 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-6: eadr0: extended address 0 register (address: 0x05) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 64-bit extended address bits (eadr<7:0>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 eadr<7:0>: 64-bit extended address bits register 2-7: eadr1: extended address 1 register (address: 0x06) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 64-bit extended addr ess bit s (eadr<15:8>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 eadr<15:8>: 64-bit exten ded address bits register 2-8: eadr2: extended address 2 register (address: 0x07) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 64-bit extended address bits (eadr<23:16>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 eadr<23:16>: 64-bit extended address bits ? 2010 microchip technology inc. preliminary ds39776c-page 25 mrf24j40 downloaded from: http:///
register 2-9: eadr3: extended address 3 register (address: 0x08) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 64-bit extended address bits (eadr<31:24>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 eadr<31:24>: 64-bit extended address bits register 2-10: eadr4: extended address 4 register (address: 0x09) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 64-bit extended address bits (eadr<39:32>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 eadr<39:32>: 64 -bit extended address bits register 2-11: eadr5: extended address 5 register (address: 0x0a) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 64-bit extended address bits (eadr<47:40>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 eadr<47:40>: 64 -bit extended address bits mrf24j40 ds39776c-page 26 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-12: eadr6: extended address 6 register (address: 0x0b) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 64-bit extended address bits (eadr<55:48>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 eadr<55:48>: 64 -bit extended address bits register 2-13: eadr7: extended address 7 register (address: 0x0c) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 64-bit extended address bits (eadr<63:56>) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 eadr<63:56>: 64 -bit extended address bits ? 2010 microchip technology inc. preliminary ds39776c-page 27 mrf24j40 downloaded from: http:///
register 2-14: rxflush: receive fi fo flush register (address: 0x0d) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 w-0 r wakepol wakepad r cmdonly dataonly bcnonly rxflush bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 reserved: main tain as 0 bit 6 wakepol: wake signal polarity bit 1 = wake signal polarity is active-high 0 = wake signal polarity is active-low (default) bit 5 wakepad: w ake i/o pin enable bit 1 = enable wake i/o pin 0 = disable wake i/o pin (default) bit 4 reserved: maintain as 0 bit 3 cmdonly: co mmand frame receive bit 1 = only command frames are received, all other frames are filtered out 0 = all valid frames are received (default) bit 2 dataonly: dat a frame receive bit 1 = only data frames are received, all other frames are filtered out 0 = all valid frames are received (default) bit 1 bcnonly: beacon frame receive bit 1 = only beacon frames are received, all other frames are filtered out 0 = all valid frames are received (default) bit 0 rxflush: rese t receive fifo address pointer bit 1 = resets the rxfifo address poin ter to zero. rxfifo data is not modified. bit is automatically cleared to 0 by hardware. mrf24j40 ds39776c-page 28 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-15: order: beacon and super frame order register (address: 0x10) r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 bo3 (1) bo2 (1) bo1 (1) bo0 (1) so3 (1) so2 (1) so1 (1) so0 (1) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-4 bo<3:0>: beaco n order bits ( macbeaconorder ) (1) specifies how often the coordinator will transmit a beacon. (2) 1111 = the coordinator will not transmit a beacon and the superframe order (so) parameter value is ignored (default) 1110 =1 4 0000 =0 bit 3-0 so<3:0>: superframe orde r bits ( macsuperframeorder ) (1) specifies the length of the active portion of the superframe, including the beacon frame. (2) 1111 = the superframe will not be active following the beacon (i.e., no active portion in the superframe (default)) 1110 =1 4 0000 =0 note 1: refer to ieee 802.15.4?-20 03 standard, secti on 7.5.1.1 superfr ame structure. 2: p ans that wish to use the su perframe structure shall set macbeaconorder to a value between 0 and 14 and macsuperframeorder to a value between 0 and the value of macbeaconorder (i.e., 0 so bo 14). ? 2010 microchip technology inc. preliminary ds39776c-page 29 mrf24j40 downloaded from: http:///
register 2-16: txmcr: csma-ca mode control register (address: 0x11) r/w-0 r/w-0 r/w-0 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 nocsma batlifext slotted macminbe1 macminbe0 csmabf2 csmabf1 csmabf0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 nocsma: n o carrier sense multiple access (csma) algorithm bits 1 = disable csma-ca algorithm when transmit ting in unslotted mode with gtsswitch (txpend 0x21<1>) bit set 0 = enable csma-ca algorithm when transmit ting in unslotted mode with gtsswitch (txpend 0x21<1>) bit set (default) bit 6 batlifext: battery life extension mode bit ( macbattlifeext ) 1 = enable 0 = disa ble (default) bit 5 slotted: slotted csma-ca mode bit 1 = enab le slotted csma-ca mode 0 = disable slotted csma-ca mode (default) bit 4-3 macminbe<1:0>: mac minimum backoff exponent bits ( macminbe ) the minimum value of the backoff exponent in the csma-c a a lgorithm. note that if this value is set to 0 , collision avoidance is disabled. (1) default: 0x3. bit 2-0 csmabf<2:0>: csma backoff bits ( macmaxcsmabackoff ) the maximum number of backoffs the csma-ca al go rithm will attempt before declaring a channel access failure. (1) 111 = undefined 110 = unde fined 101 = 5 100 = 4 (default) 011 = 3 010 = 2 001 = 1 000 = 0 note 1: re fer to ieee 802.15.4?-2003 standard, table 71 C mac pib attributes. mrf24j40 ds39776c-page 30 preliminary ? 2010 microchip technology inc. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 31 mrf24j40 register 2-17: acktmout: mac ack time -out duration regist er (address: 0x12) r/w-0 r/w-0 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 r/w-1 drpack mawd6 (1) mawd5 (1) mawd4 (1) mawd3 (1) mawd2 (1) mawd1 (1) mawd0 (1) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 drpack: da ta request pending acknowledgement bit (1) sets or clears the frame pending bit in the acknow ledgement frame for a received data request mac command.1 = set s frame pending bit 0 = clears frame pending bit bit 6-0 mawd<6:0>: macackwa itduration bits (2) the maximum number of symbols to wait for an ack nowledgment frame to arrive following a transmitted data or mac command frame. units: symbol period (16 s). default value: 0x39. note 1: refer to ieee 802.15.4?-2 003 standard, sect ion 5.4.2.2 data transfer from a coordinator and section 7.3 mac command frames. 2: refer to ieee 802.15.4?-2 003 standard, table 71: mac pib attributes. downloaded from: http:///
register 2-18: eslotg1: gts1 and cap end slot register (address: 0x13) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 gts1-3 gts1-2 gts1-1 gts1-0 cap3 cap2 cap1 cap0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-4 gts1-<3:0>: end slot of 1st gts bits 1111 = 15 0000 = 0 (de fault) bit 3-0 cap<3:0>: contention access period (cap) end slot bits 1111 = 15 0000 = 0 (de fault) mrf24j40 ds39776c-page 32 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-19: symtickl: symbol period ti ck low byte register (address: 0x14) r/w-0 r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 tickp7 tickp6 tickp5 tickp4 tickp3 tickp2 tickp1 tickp0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 tickp<7:0>: s ymbol period tick bits number of ticks to define a symbol period. tick pe riod is based on the system clock frequency of 20 mhz. tickp is a 9-bit value. the tickp8 bit is located in symtickh<0>. units: tick (50 ns). default value = 0x140 (320 * 50 ns = 16 s). ? 2010 microchip technology inc. preliminary ds39776c-page 33 mrf24j40 register 2-20: symtickh: symbol period tick high byte register (address: 0x15) r/w-0 r/w-1 r/w-0 r/w-1 r/w-0 r/w-0 r/w-0 r/w-1 txont6 (1) txont5 (1) txont4 (1) txont3 (1) txont2 (1) txont1 (1) txont0 (1) tickp8 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-1 txont<6:0>: t ransmitter enable on time tick bits (1) transmitter on time before beginning of packet. txont is a 9-bit value. the txont<8:7> bits are located in pacon2<1:0>. units: tick (50 ns ). default value = 0x028 (40 * 50 ns = 2 s). bit 0 tickp8: symbol period tick bit number of ticks to define a symbol period. tick pe riod is based on the system clock frequency of 20 mhz. tickp is a 9-bit value. the tickp<7:0> bits are located in symtickl<7:0>. units: tick (50 ns). default value = 0x140 (320 * 50 ns = 16 s). note 1: refer to figure 4-4 for timing diagram. downloaded from: http:///
mrf24j40 ds39776c-page 34 preliminary ? 2010 microchip technology inc. register 2-21: pacon0: po wer amplifier control 0 register (address: 0x16) r/w-0 r/w-0 r/w-1 r/w-0 r/w-1 r/w-0 r/w-0 r/w-1 paont7 (1) paont6 (1) paont5 (1) paont4 (1) paont3 (1) paont2 (1) paont1 (1) paont0 (1) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 paont<7:0>: power amplifier enable on time tick bits (1) power amplifier on time before beginning of packet. paont is a 9-bit value. the paont8 bit is located in pacon1<0>. units: tick (50 ns). default value = 0x029 (41 * 50 ns = 2.05 s). note 1: refer to figure 4-4 for timing diagram. register 2-22: pacon1: po wer amplifier control 1 register (address: 0x17) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r r r paonts3 (1) paonts2 (1) paonts1 (1) paonts0 (1) paont8 (1) bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-5 reserved: main tain as 0 bit 4-1 paonts<3:0>: power amplifier enable on time symbol bits (1) power amplifier on time before beginning of packet. units: symbol period (16 s). minimum value: 0x1 (default) (1 * 16 s = 16 s). bit 0 paont8: power amplifier enable on time tick bit (1) power amplifier on time before beginning of packet. paont is a 9-bit value. the paont<7:0> bits are located in pacon0<7:0>. units: tick (50 ns). default value = 0x029 (41 * 50 ns = 2.05 s). note 1: refer to figure 4-4 for timing diagram. downloaded from: http:///
register 2-23: pacon2: po wer amplifier control 2 register (address: 0x18) r/w-1 r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-0 fifoen r txonts3 (1) txonts2 (1) txonts1 (1) txonts0 (1) txont8 (1) txont7 (1) bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 fifoen: f ifo enable bit 1 = enabled (default). always maintain this bit as a 1 . bit 6 reserved: maintain as 0 bit 5-2 txonts<3:0>: t ransmitter enable on time symbol bits (1) transmitter on time before beginning of packet. units: symbol period (16 s). minimum value: 0x1. default value: 0x2 (2 * 16 s = 32 s). recommended value: 0x6 (6 * 16 s = 96 s). bit 1-0 txont<8:7>: t ransmitter enable on time tick bits (1) transmitter on time before beginning of packet. txont is a 9-bit value. txont<6:0> bits are located in symtickh<7:1>. units: tick (50 ns). default value = 0x028 (40 * 50 ns = 2 s). note 1: refer to figure 4-4 for timing diagram. ? 2010 microchip technology inc. preliminary ds39776c-page 35 mrf24j40 downloaded from: http:///
register 2-24: txbcon0: transmit beacon fi fo control 0 regist er (address: 0x1a) r-0 r-0 r-0 r-0 r-0 r-0 r/w-0 w-0 r r r r r r txbsecen txbtrig bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-2 reserved: maint ain as 0 bit 1 txbsecen: tx beacon fifo security enabled bit 1 = security enabled 0 = security disabled (default) bit 0 txbtrig: t ransmit frame in tx beacon fifo bit 1 = transmit the frame in the tx beacon fifo; bit is automatically cleared by hardware mrf24j40 ds39776c-page 36 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-25: txncon: trans mit normal fifo control register (address: 0x1b) r/w-0 r/w-0 r/w-0 r-0 r/w-0 r/w-0 r/w-0 w-0 r r r fpstat (1) indirect (4) txnackreq (2,4) txnsecen (3,4) txntrig bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-5 reserved: maint ain as 0 bit 4 fpstat: frame pending status bit (1) status of the frame pending bit in the received acknowledgement frame. 1 = sets frame pending bit 0 = cle ars frame pending bit bit 3 indirect: activa te indirect transmission bit (coordinator only) (4) 1 = indirect transmission enabled 0 = indirect transmission disabled (default) bit 2 txnackreq: tx normal f ifo acknowledgement request bit (2,4) transmit a frame with acknowledgement frame ex pected. if acknowledgem ent is not received, retransmit. 1 = acknowledgement requested 0 = no acknowledgement requested (default) bit 1 txnsecen: tx normal fif o security enabled bit (3,4) 1 = security enabled 0 = security disabled (default) bit 0 txntrig: transmit frame in tx normal fifo bit 1 = transmit the frame in the tx normal fi fo; bit is automatically cleared by hardware note 1: refer to ieee 802.15.4? -2003 standard, sect ion 7.2.1.1.3 frame pending subfield. 2: refer to ieee 802.15.4-2003 standard, secti on 7.2.1.1.4 acknowledgem ent request subfield. 3: refer to ieee 802.15.4-2003 standard, secti on 7.2.1.1.2 securit y enabled subfield. 4: bit is cleared at the next triggering of txn fifo. ? 2010 microchip technology inc. preliminary ds39776c-page 37 mrf24j40 downloaded from: http:///
register 2-26: txg1con: gts1 fifo control register (address: 0x1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 w-0 txg1retry1 txg1retry0 txg1slot2 txg1slot1 txg1slot0 txg1ackreq txg1secen txg1trig bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-6 txg1retry<1:0>: t x gts1 fifo retry times bits write: retry times of packet read: number of retry times of the successfully transmitted packet bit 5-3 txg1slot<2:0>: gts slot that tx gts1 fifo occupies bits bit 2 txg1ackreq: t x gts1 fifo acknowledgement request bit transmit a frame with acknowledgement frame expect ed. if acknow ledgement is not received, retransmit. 1 = acknowledgement requested 0 = no acknowledgement requested (default) bit 1 txg1secen: t x gts1 fifo security enabled bit 1 = security enabled 0 = security disabled (default) bit 0 txg1trig: t ransmit frame in tx gts1 fifo bit 1 = transmit the frame in the tx gts1 fifo ; bit is automatically cleared by hardware register 2-27: txg2con: gts2 fifo control register (address: 0x1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 w-0 txg2retry1 txg2retry0 txg2slot2 txg2slot1 txg2slot0 txg2ackreq txg2secen txg2trig bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-6 txg2retry<1:0>: tx gt s2 fifo retry times bits write: retry times of packet read: number of retry times of th e successfully transmitted packet bit 5-3 txg2slot<2:0>: gt s slot that tx gts2 fifo occupies bits bit 2 txg2ackreq: tx gts2 fifo acknowledgement request bit transmit a frame with acknowledgem ent frame expected. if acknowledgement is not received, retransmit. 1 = acknowledgement requested 0 = no acknowledgement requested (default) bit 1 txg2secen: tx gt s2 fifo security enabled bit 1 = security enabled 0 = security disabled (default) bit 0 txg2trig: transmit frame in tx gts2 fifo bit 1 = transmit the frame in the tx gts2 fif o; bit is automatically cleared by hardware mrf24j40 ds39776c-page 38 preliminary ? 2010 microchip technology inc. cd downloaded from: http:///
register 2-28: eslotg23: end slot of gts3 and gts2 register (address: 0x1e) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 gts3-3 gts3-2 gts3-1 gts3-0 gts2-3 gts2-2 gts2-1 gts2-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-4 gts3-<3:0>: end slot of 3rd gts bits bit 3-0 gts2-<3:0>: end slot of 2nd gts bits register 2-29: eslotg45: end slot of gts5 and gts4 register (address: 0x1f) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 gts5-3 gts5-2 gts5-1 gts5-0 gts4-3 gts4-2 gts4-1 gts4-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-4 gts5-<3:0>: end slot of 5th gts bits bit 3-0 gts4-<3:0>: end slot of 4th gts bits register 2-30: eslotg67: end slot of gts6 register (address: 0x20) r-0 r-0 r-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 r r r r gts6-3 gts6-2 gts6-1 gts6-0 bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-4 reserved: maint ain as 0 bit 3-0 gts6-<3:0>: en d slot of 6th gts bits if 7th gts exists, the end slot must be 15. ? 2010 microchip technology inc. preliminary ds39776c-page 39 mrf24j40 downloaded from: http:///
register 2-31: txpend: tx data pending register (address: 0x21) r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 mlifs5 mlifs4 mlifs3 mlifs2 mlifs1 mlifs0 gtsswitch fpack (1) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-2 mlifs<5:0>: minimum lon g interframe spacing bits the minimum number of symbols forming a long interframe spacing (lifs) period. refer to ieee 802.15.4?-2003 standard, sect ion 7.5.1.2 ifs and table 70: mac sublayer constants. mlifs + rfstbl = a minlifsperiod = 40 symbols. units: symbol period (16 s). default value: 0x21. recommended values: mlifs = 0x1f and rfstbl = 0x9. bit 1 gtsswitch: continue tx gts fifo switch in cfp bit 1 = gts1 and gts2 fifo will toggle with each other during cfp 0 = gts1 and gts2 fifo will stop toggling with ea ch other if the transmission fails (default) bit 0 fpack: f rame pending bit in the acknowledgement frame bit (1) sets or clears the frame pending bit in the acknowledgement frame. 1 = sets frame pending bit 0 = clears frame pending bit note 1: refer to ieee 802.15.4? -2003 standard, secti on 7.2.1.1.3 frame pending subfield and section 7.2.2.3.1 acknowledgement frame mhr fields. mrf24j40 ds39776c-page 40 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-32: wakecon: wake co ntrol register (address: 0x22) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 immwake regwake intl intl intl intl intl intl bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 immwake: immedia te wake-up mode enable bit 1 = enable immediate wake-up mode 0 = disa ble immediate wake-up mode (default) bit 6 regwake: reg ister wake-up signal bit host processor should set to 1 , then clear to 0 , to perform wake-up. bit 5-0 intl<5:0>: interval to start beacon (1) for beacon-enabled mode the timing interval between triggering slotted mode and the first time to transmit beacon. default value: 0x00. note 1: refer to section 3.8.1.4 configuring beacon-enabled pan coordinator for more information. ? 2010 microchip technology inc. preliminary ds39776c-page 41 mrf24j40 downloaded from: http:///
register 2-33: frmoffset: superframe counter offset to align beacon register (address: 0x23) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 offset7 (1) offset6 (1) offset5 (1) offset4 (1) offset3 (1) offset2 (1) offset1 (1) offset0 (1) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 offset<7:0>: sup erframe counter offset for align air slot boundary bits (1) for beacon-enabled mode device. default value: 0x00. recommended value: 0x15. note 1: refer to section 3.8.1.6 configuring beacon-enabled device for more information. mrf24j40 ds39776c-page 42 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-34: txstat: tx mac st atus register (address: 0x24) r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 txnretry1 txnretry0 ccafail txg2fnt txg1fnt txg2stat txg1stat txnstat bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-6 txnretry<1:0>: tx normal fifo retry times bits number of retries of the most recent tx no rmal fifo transmission. bit 5 ccafail: c lear channel assessment (cca) st atus of last transmission bit 1 = channel busy 0 = channel idle bit 4 txg2fnt: tx gts2 fifo transmission failed due to not enough time before the end of gts bit 1 = failed 0 = succeeded bit 3 txg1fnt: tx gts1 f ifo transmission failed due to not enough time before the end of gts bit 1 = fa iled 0 = succeeded bit 2 txg2stat: tx gt s2 fifo release status bit 1 = failed, retry count exceeded 0 = succeeded bit 1 txg1stat: tx gts2 fifo release status bit 1 = failed, retry count exceeded 0 = succeeded bit 0 txnstat: t x normal fifo release status bit 1 = failed, retry count exceeded 0 = succeeded ? 2010 microchip technology inc. preliminary ds39776c-page 43 mrf24j40 downloaded from: http:///
register 2-35: txbcon1: transmit be acon control 1 register (address: 0x25) r/w-0 r-0 r/w-1 r/w-1 r-0 r-0 r-0 r-0 txbmsk wu /bcn rssinum1 rssinum0 r r r r bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 txbmsk: t x beacon fifo interrupt mask bit 1 = tx beaco n fifo interrupt is masked 0 = tx beacon fifo interrupt is not masked (default) bit 6 wu /bcn: wake-up /beacon interrupt status bit indicates if the wakeif interrupt was due to beacon start or wake-up. 1 = beaco n start interrupt 0 = w ake-up interrupt bit 5-4 rssinum<1:0>: rssi a verage symbols bits 11 = 8 symb ols (default) 10 = 4 symbols 01 = 2 symb ols 00 = 1 symbol bit 3-0 reserved: main tain as 0 mrf24j40 ds39776c-page 44 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-36: gateclk: gated cloc k control register (address: 0x26) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r r r r gtson r r r bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-4 reserved: main tain as 0 bit 3 gtson: gts fifo clock enable bit 1 = enabled 0 = disab led (default) bit 2-0 reserved: main tain as 0 ? 2010 microchip technology inc. preliminary ds39776c-page 45 mrf24j40 downloaded from: http:///
register 2-37: txtime: tx turnarou nd time register (address: 0x27) r/w-0 r/w-1 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-0 turntime3 turntime2 turntime1 turntime0 r r r r bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-4 turntime<3:0>: t urnaround time bits transmission to reception and reception to transmission turnaround time. refer to ieee 802.15.4?-2003 standard, table 18: phy c onst ants and section 7.5. 6.4.2 acknowledgment. turntime + rfstbl = aturnaroundtime = 12 symbols. units: symbol period (16 s). default value: 0x4. minimum value: 0x2. recommended values: turntime = 0x3 and rfstbl = 0x9. bit 3-0 reserved: maintain as 0x8 mrf24j40 ds39776c-page 46 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-38: hsymtmrl: half symbol ti mer low byte register (address: 0x28) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 hsymtmr7 hsymtmr6 hsymtmr5 hsymtmr4 hsymtmr3 hsymtmr2 hsymtmr1 hsymtmr0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 hsymtmr<7:0>: hal f symbol timer low byte bits units: 8 s. register 2-39: hsymtmrh: half symbol timer high byte register (address: 0x29) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 hsymtmr15 hsymtmr14 hsymtmr13 hsymtmr12 hsymtmr11 hsymtmr10 hsymtmr09 hsymtmr08 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 hsymtmr<15:8>: ha lf symbol timer high byte bits units: 8 s. ? 2010 microchip technology inc. preliminary ds39776c-page 47 mrf24j40 downloaded from: http:///
register 2-40: softrst: software reset register (address: 0x2a) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 w-0 w-0 w-0 r r r r r rstpwr rstbb rstmac bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-3 reserved: main tain as 0 bit 2 rstpwr: power management reset bit 1 = reset power management circuitry (bit is automatically cleared to 0 by hardware) bit 1 rstbb: baseband reset bit 1 = reset baseband circuitry (bit is automatically cleared to 0 by hardware) bit 0 rstmac: mac reset bit 1 = reset mac circuitry (bit is automatically cleared to 0 by hardware) mrf24j40 ds39776c-page 48 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-41: seccon0: security control 0 register (address : 0x2c) w-0 w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 secignore secstart rxcipher2 rxcipher1 rxcipher0 txncipher2 txncipher1 txncipher0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 secignore: rx security decryption ignore bit 1 = ignore decryption process bit 6 secstart: rx security decryption start bit 1 = start decryption process bit 5-3 rxcipher<2:0>: rx fifo security suite select bits 111 = aes-cbc-mac-32 110 = aes-cbc-mac-64 101 = aes-cbc-mac-128 100 = aes-ccm-32 011 = aes-ccm-64 010 = aes-ccm-128 001 = aes-ctr 000 = none (default) bit 2-0 txncipher<2:0>: tx normal fifo security suite select bits 111 = aes-cbc-mac-32 110 = aes-cbc-mac-64 101 = aes-cbc-mac-128 100 = aes-ccm-32 011 = aes-ccm-64 010 = aes-ccm-128 001 = aes-ctr 000 = none (default) ? 2010 microchip technology inc. preliminary ds39776c-page 49 mrf24j40 downloaded from: http:///
register 2-42: seccon1: security control 1 register (address: 0x2d) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r txbcipher2 txbcipher1 txbcipher0 r r disdec disenc bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 reserved: r ead as 0 bit 6-4 txbcipher<2:0>: t x beacon fifo security suite select bits 111 = aes-cbc-mac-32 110 = aes-cbc-mac-64 101 = aes-cbc-mac-128 100 = aes-ccm-32 011 = aes-ccm-64 010 = aes-ccm-128 001 = aes-ctr 000 = none (default) bit 3-2 reserved: read as 0 bit 1 disdec: disable decryption function bit 1 = will not generate a security interrupt if security enabled bit is set in the mac header bit 0 disenc: disable encryption function bit 1 = will not encrypt packet if transmit security is enabled mrf24j40 ds39776c-page 50 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-43: txstbl: tx stabiliz ation register (address: 0x2e) r/w-0 r/w-1 r/w-1 r/w-1 r/w-0 r/w-1 r/w-0 r/w-1 rfstbl3 rfstbl2 rfstbl1 rfstbl0 msifs3 msifs2 msifs1 msifs0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-4 rfstbl<3:0>: vco stabilization period bits units: symbol period (16 s). defau lt value: 0x7. recommended value: 0x9. bit 3-0 msifs<3:0>: minimu m short interframe spacing bits the minimum number of symbols forming a short in terframe spacing (sifs) period. refer to ieee 802.15.4?-2003 standard, section 7.5.1.2 ifs and table 70: mac sublayer constants. msifs + rfstbl = ami nsifsperiod = 12 symbols. units: symbol period (16 s). default value: 0x5. ? 2010 microchip technology inc. preliminary ds39776c-page 51 mrf24j40 downloaded from: http:///
register 2-44: rxsr: rx mac status register (address: 0x30) r-0 r/w-0 r-0 r-0 r-0 r-0 r-0 r/w-0 r upsecerr batind (1) r r secdecerr r r bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 reserved: re ad as 0 bit 6 upsecerr: mic error in upper layer security mode bit 1 = mic error occurred. write 1 to clear 0 = mic error did not occur bit 5 batind: battery low -voltage indicator bit (1) 1 = supply voltage is lower than battery low-voltage threshold 0 = supply voltage is greater than battery low-voltage threshold bit 4-3 reserved: maint ain as 0 bit 2 secdecerr: security decryption error 1 = security decryption error occurred 0 = security decryption error did not occur bit 1-0 reserved: maintain as 0 note 1: battery low-voltage threshold (batth) value set in the rfcon5 (0x205<7:4>) register and the battery monitor enable (baten) bit located in the rfcon6 (0x206<3>) register. mrf24j40 ds39776c-page 52 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-45: intstat: interrupt status register (address: 0x31) rc-0 rc-0 rc-0 rc-0 rc-0 rc-0 rc-0 rc-0 slpif (1) wakeif (1) hsymtmrif (1) secif (1) rxif (1) txg2if (1) txg1if (1) txnif (1) bit 7 bit 0 legend: rc = read to clear bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 slpif: sleep alert interrupt bit (1) 1 = sleep alert interrupt occurred 0 = no slee p alert interrupt occurred bit 6 wakeif: w ake-up alert interrupt bit (1) 1 = a wake-up alert interrupt occurred 0 = no wake-up alert interrupt occurred bit 5 hsymtmrif: half symbol t imer interrupt bit (1) 1 = a half symbol timer interrupt occurred 0 = no half symbol timer interrupt occurred bit 4 secif: security key request interrupt bit (1) 1 = a security key request interrupt occurred 0 = no security k ey re quest interrupt occurred bit 3 rxif: rx fifo reception interrupt bit (1) 1 = an rx fifo recept ion interrupt occurred 0 = no rx fifo reception interrupt occurred bit 2 txg2if: tx gts2 fifo transmission interrupt bit (1) 1 = a tx gts2 fifo trans mission interrupt occurred 0 = no tx gts2 fifo tran smission interrupt occurred bit 1 txg1if: tx gts1 fifo transmission interrupt bit (1) 1 = a tx gts1 fifo trans mission interrupt occurred 0 = no tx gts1 fifo tran smission interrupt occurred bit 0 txnif: tx normal fifo release interrupt bit (1) 1 = a tx normal fifo transmission interrupt occurred 0 = no tx normal fifo trans mission interrupt occurred note 1: in terrupt bits are cleared to 0 when the intstat register is read. ? 2010 microchip technology inc. preliminary ds39776c-page 53 mrf24j40 downloaded from: http:///
register 2-46: intcon: interrupt control register (address: 0x32) r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 slpie wakeie hsymtmrie secie rxie txg2ie txg1ie txnie bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 slpie: s leep alert interrupt enable bit 1 = disables the sleep alert interrupt (default) 0 = enab les the sleep alert interrupt bit 6 wakeie: w ake-up alert interrupt enable bit 1 = disab les the wake-up alert interrupt (default) 0 = enables the wake-up alert interrupt bit 5 hsymtmrie: h alf symbol timer interrupt enable bit 1 = disab les the half symbol timer interrupt (default) 0 = enables the half symbol timer interrupt bit 4 secie: security key request interrupt enable bit 1 = disables the security key request interrupt (default) 0 = enab le security key request interrupt bit 3 rxie: rx fif o reception interrupt enable bit 1 = disab les the rx fifo reception interrupt (default) 0 = enables the rx fifo reception interrupt bit 2 txg2ie: t x gts2 fifo transmission interrupt enable bit 1 = disab les the tx gts2 fifo transmission interrupt (default) 0 = enables the tx gts2 fifo transmission interrupt bit 1 txg1ie: tx gts1 fifo transmission interrupt enable bit 1 = disables the tx gts1 fifo transmission interrupt (default) 0 = enab les the tx gts1 fifo transmission interrupt bit 0 txnie: t x normal fifo transmission interrupt enable bit 1 = disab les the tx normal fifo transmission interrupt (default) 0 = enables the tx normal fifo transmission interrupt mrf24j40 ds39776c-page 54 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-47: gpio: gpio po rt register (address: 0x33) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r r gpio5 gpio4 gpio3 gpio2 gpio1 gpio0 bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-6 reserved: main tain as 0 bit 5 gpio5: gen eral purpose i/o gpio5 bit bit 4 gpio4: general purpose i/o gpio4 bit bit 3 gpio3: gen eral purpose i/o gpio3 bit bit 2 gpio2: general purpose i/o gpio2 bit bit 1 gpio1: gen eral purpose i/o gpio1 bit bit 0 gpio0: gen eral purpose i/o gpio0 bit register 2-48: trisgpio: gpio pi n direction register (address: 0x34) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r r trisgp5 trisgp4 trisgp3 trisgp2 trisgp1 trisgp0 bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-6 reserved: main tain as 0 bit 5 trisgp5: ge neral purpose i/o gpio5 direction bit 1 = output 0 = input (default) bit 4 trisgp4: general purpose i/o gpio4 direction bit 1 = output 0 = input (default) bit 3 trisgp3: ge neral purpose i/o gpio3 direction bit 1 = output 0 = input (default) bit 2 trisgp2: ge neral purpose i/o gpio2 direction bit 1 = output 0 = input (default) bit 1 trisgp1: general purpose i/o gpio1 direction bit 1 = output 0 = input (default) bit 0 trisgp0: ge neral purpose i/o gpio0 direction bit 1 = output 0 = input (default) ? 2010 microchip technology inc. preliminary ds39776c-page 55 mrf24j40 downloaded from: http:///
register 2-49: slpack: sleep acknowledgem ent and wake-up counter register (address: 0x35) w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 slpack wakecnt6 wakecnt5 wakecnt4 wakecnt3 wakecnt2 wakecnt1 wakecnt0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 slpack: sl eep acknowledge bit 1 = places the mrf2 4j40 to sleep (automatically cleared to 0 by hardware) bit 6-0 wakecnt<6:0>: w ake count bits main oscillator (20 mhz) start-up timer counter bits. wakecnt is a 9-bit value. wakecnt<8:7> bits are located in rfctl<4:3>. units: sleep clock (slpclk) period. (1) default value: 0x00. recommended value: 0x05f. note 1: sleep clock (slpclk) period d epends on the sleep clock select ion (slpclksel) rfcon7<7:6> and sleep clock divisor (slpclkdiv) slpcon1<4:0>. mrf24j40 ds39776c-page 56 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-50: rfctl: rf mode control register (address: 0x36) w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r r r wakecnt8 wakecnt7 rfrst (2) rftxmode rfrxmode bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-5 reserved: main tain as 0 bit 4-3 wakecnt<8:7>: w ake count bits main oscillator (20 mhz) start-up timer counter bi t s. wakecnt is a 9-bit value. wakecnt<6:0> bits are located in slpack<6:0>. units: sleep clock (slpclk) period. (1) default value: 0x00. recommended value: 0x05f bit 2 rfrst: rf state machine reset bit (2) 1 = hold rf state machine in reset 0 = normal operation of rf state machine bit 1 rftxmode: forces rf control state machine to transmit state (3) bit 0 rfrxmode: forces rf control state machine to receive state note 1: sleep clock (slpclk) period de pends on the sleep clock select ion (slpclksel) rfcon7<7:6> and sleep clock divisor (slpclkdiv) slpcon1<4:0>. 2: perform rf r eset by setting rfrst = 1 and then rfrst = 0 . delay at least 192 s after performing to allow rf circuitry to calibrate. 3: recommen ded sequence rfctl = 0x06 (reset mode) then rfctl = 0x02 (transmit mode). ? 2010 microchip technology inc. preliminary ds39776c-page 57 mrf24j40 downloaded from: http:///
register 2-51: seccr2: security co ntrol 2 register (address: 0x37) w-0 w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 updec upenc txg2cipher2 txg2cipher1 txg2cipher0 txg1cipher2 txg1cipher1 txg1cipher0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 updec: upp er layer security decryption mode bit 1 = perform upper layer decryption using tx normal fifo. automatically cleared to 0 when finished. bit 6 upenc: upper layer security encryption mode bit 1 = perform upper layer encryption using tx normal fifo. automati cally cleared to 0 when finished. bit 5-3 txg2cipher-<2:0>: tx gts2 fifo securi ty suite select bits 111 = aes-cbc-mac-32 110 = ae s-cbc-mac-64 101 = ae s-cbc-mac-128 100 = ae s-ccm-32 011 = ae s-ccm-64 010 = ae s-ccm-128 001 = ae s-ctr 000 = none (default) bit 2-0 txg1cipher-<2:0>: tx gts1 fifo securi ty suite select bits 111 = aes-cbc-mac-32 110 = ae s-cbc-mac-64 101 = ae s-cbc-mac-128 100 = ae s-ccm-32 011 = ae s-ccm-64 010 = ae s-ccm-128 001 = ae s-ctr 000 = none (default) mrf24j40 ds39776c-page 58 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-52: bbreg0: baseband 0 register (address: 0x38) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r r r r r r r turbo bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-1 reserved: main tain as 0 bit 0 turbo: turbo mode enable bit 1 = turbo mode (625 kbps) 0 = ieee 802.15.4? mode (250 kbps) register 2-53: bbreg1: baseband 1 register (address: 0x39) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r r r r r rxdecinv r r bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-3 reserved: ma intain as 0 bit 2 rxdecinv: rx decode inversion bit 1 = rx decode symbol sign inverted 0 = rx decode symbol sign not inverted (default) bit 1-0 reserved: ma intain as 0 ? 2010 microchip technology inc. preliminary ds39776c-page 59 mrf24j40 downloaded from: http:///
register 2-55: bbreg3: baseband 3 register (address: 0x3b) r/w-1 r/w-1 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 prevalidth3 prevalidth2 prevalidth1 prevalidth0 predetth2 predetth1 predetth0 r bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-4 prevalidth<3:0>: preamble search energy valid threshold bits 1101 = ieee 802.15.4? (250 kbps) optimized value (default) 0011 = turbo mode (625 kbps) optimized value bit 3-1 predetth<2:0>: preamble search energy detection threshold bits default value: 0x4. bit 0 reserved: maintain as 0 mrf24j40 ds39776c-page 60 preliminary ? 2010 microchip technology inc. register 2-54: bbreg2: baseband 2 register (address: 0x3a) r/w-0 r/w-1 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-0 ccamode1 ccamode0 ccacsth3 ccacsth2 ccatcsh1 ccacsth0 r r bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-6 ccamode<1:0>: clear channel assessment (cca) mode bits 11 = cca mode 3: carrier sense with energy above thre shold. cca shall report a busy medium only upon the detection of a signal with the modulation and spreading characteri stics of ieee 802.15.4? with energy above the energy detection (ed) threshold. 10 = cca mode 1: energy above threshold. cca shall report a busy medium upon detecting any energy above the energy detection (ed) threshold. 01 = cca mode 2: carrier sense only. cca shall report a busy medium only upon the detection of a signal with the modulation and spreading characte ristics of ieee 802.15.4. this signal may be above or below the energy detection (ed) threshold (default). 00 = reserved bit 5-2 ccacsth<3:0>: clear channel assessment (cca) carrier sense (cs) threshold bits 1111 = 1110 = recommended value 1101 = 0010 = (default) 0001 = 0000 = bit 1-0 reserved: maintain as 0 downloaded from: http:///
register 2-56: bbreg4: baseband 4 register (address: 0x3c) r/w-1 r/w-0 r/w-0 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 csth2 csth1 csth0 precnt2 precnt1 precnt0 r r bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-5 csth<2:0>: c arrier sense threshold bits 100 = ieee 802.15.4? (250 kbps) optimized value (default) 010 = turbo mode (625 kbps) optimized value bit 4-2 precnt<2:0>: preamble counter threshold bits 111 = optimized value (default) bit 1-0 reserved: maintain as 0 register 2-57: bbreg6: baseband 6 register (address: 0x3e) w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r-1 rssimode1 rssimode2 r r r r r rssirdy bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 rssimode1: rssi mode 1 bit 1 = initiate rssi calculation (bit is automatically cleared to 0 by hardware) bit 6 rssimode2: rssi mode 2 bit 1 = cal culate rssi for each received packet. the rssi value is stored in rxfifo 0 = rssi calculation is not performe d for each received packet (default) bit 5-1 reserved: maintain as 0 bit 0 rssirdy: rssi rea dy signal for rssimode1 bit if rssimode1 = 1 , t hen 1 = rssi calculation has finish ed and the rssi value is ready 0 = rssi calculation in progress ? 2010 microchip technology inc. preliminary ds39776c-page 61 mrf24j40 downloaded from: http:///
register 2-58: ccaedth: energy dete ction threshold for cca register (address: 0x3f) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ccaedth7 ccaedth6 ccaedth5 ccaedth4 ccaedth3 ccaedth2 ccaedth1 ccaedth0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 ccaedth<7:0>: cle ar channel assessment (cca) energy detection (ed) mode bits if the in-band signal strength is greater than the th re shold, the channel is busy. the 8-bit value can be mapped to a power level according to rssi. refer to section 3.6 received signal strength indicator (rssi)/energy detection (ed) . default value: 0x00. recommended valu e : 0x60 (approximately -69 dbm). mrf24j40 ds39776c-page 62 preliminary ? 2010 microchip technology inc. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 63 mrf24j40 2.15.4 long ad dress control registers detail register 2-59: rfcon0: rf cont rol 0 register (address: 0x200) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 channel3 channel2 channel1 channel0 rfopt3 rfopt2 rfopt1 rfopt0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-4 channel<3:0>: c hannel number bits 0000 = channel 11 (2405 mhz) (default) 0001 = channel 12 (2410 mhz) 0010 = channel 13 (2415 mhz) 1111 = channel 26 (2480 mhz) bit 3-0 rfopt<3:0>: rf optimize control bits default value: 0x0. recommended value: 0x3. register 2-60: rfcon1: rf cont rol 1 register (address: 0x201) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 vcoopt7 vcoopt6 vcoopt5 vcoopt4 vcoopt3 vcoopt2 vcoopt1 vcoopt0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 vcoopt<7:0>: vco opti mize control bits default value: 0x0. recommended value: 0x2. downloaded from: http:///
register 2-61: rfcon2: rf cont rol 2 register (address: 0x202) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pllen (1) r r r r r r r bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 pllen: pll enab le bit (1) 1 = enabled 0 = disabled (default) bit 6-0 reserved: main tain as 0 note 1: pll must be enabled for rf reception or transmission. register 2-62: rfcon3: rf cont rol 3 register (address: 0x203) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 txpwrl1 txpwrl0 txpwrs2 txpwrs1 txpwrs0 r r r bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-6 txpwrl<1:0>: large scale control for tx power bits 11 = -30 db 10 = -20 db 01 = -10 db 00 = 0 db bit 5-3 txpwrs<2:0>: small scale control for tx power bits 111 = -6.3 db 110 = -4.9 db 101 = -3.7 db 100 = -2.8 db 011 = -1.9 db 010 = -1.2 db 001 = -0.5 db 000 = 0 db bit 2-0 reserved: maintain as 0 mrf24j40 ds39776c-page 64 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-63: rfcon5: rf cont rol 5 register (address: 0x205) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 batth3 (1) batth2 (1) batth1 (1) batth0 (1) r r r r bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-4 batth<3:0>: ba ttery low-voltage threshold bits (1) 1110 = 3.5v 1101 = 3.3v 1100 = 3. 2v 1011 = 3.1v 1010 = 2.8v 1001 = 2. 7v 1000 = 2.6v 0111 = 2.5v 0110 = undefined ... 0000 = undefined bit 3-0 reserved: main tain as 0 note 1: the battery low-voltage indicator (batind) bit is loca ted in the rxsr (0x30<5>) register and the battery monitor enable (baten) bit is located in the rfcon6 (0x206<3>) register. register 2-64: rfcon6: rf cont rol 6 register (address: 0x206) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 txfil r r 20mrecvr baten (1) r r r bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 txfil: t x filter control bit default value: 0 . recommend ed value: 1 . bit 6-5 reserved: maint ain as 0 bit 4 20mrecvr: 20 mhz clock recovery control bits recovery from sleep control. 1 = le ss than 1 ms (recommended) 0 = less than 3 ms (default) bit 3 baten: batte ry monitor enable bit (1) 1 = enabled 0 = disabled (default) bit 2-0 reserved: maintain as 0 note 1: the battery low-voltage threshold (batth) bits are located in the rfcon5 (0x205<7:4>) register and the battery low-voltage indicator (batind) bit is located in the rxsr (0x30<5>) register. ? 2010 microchip technology inc. preliminary ds39776c-page 65 mrf24j40 downloaded from: http:///
register 2-65: rfcon7: rf cont rol 7 register (address: 0x207) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 slpclksel1 slpclksel0 r r r r r r bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-6 slpclksel<1:0>: slee p clock selection bits 10 = 10 0 khz internal oscillator 01 = 32 khz external crystal oscillator bit 5-0 reserved: maintain as 0 register 2-66: rfcon8: rf cont rol 8 register (address: 0x208) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rfvco bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-5 reserved: main tain as 0 bit 4 rfvco: vco control bit default value: 0 . recommended value: 1 . bit 3-0 reserved: maintain as 0 mrf24j40 ds39776c-page 66 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-67: slpcal0: sleep calibra tion 0 register (address: 0x209) r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 slpcal7 slpcal6 slpcal5 slpcal4 slpcal3 slpcal2 slpcal1 slpcal0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 slpcal<7:0>: sleep cal ibration counter bits 20-bit counter to calibrate the sleep clock (slp clk) pe riod. the counter contains the count of 16 slpclk periods. the slpclk period depends on the sleep clock selection (slpclksel), rfcon7<7:6> and sleep clock divisor (slpclkdiv) slpcon1<4:0> bits. units: tick (50 ns). register 2-68: slpcal1: sleep calibra tion 1 register (address: 0x20a) r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 slpcal15 slpcal14 slpcal13 slpcal12 slpcal11 slpcal10 slpcal9 slpcal8 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 slpcal<15:8>: sleep cal ibration counter bits 20-bit counter to calibrate the sleep clock (slpcl k) period. the counter contains the count of 16 slpclk periods. the slpclk period depends on the sleep clock selection (slpclksel), rfcon7<7:6> and sleep clock divisor (slpclkdiv) slpcon1<4:0> bits. units: tick (50 ns). ? 2010 microchip technology inc. preliminary ds39776c-page 67 mrf24j40 downloaded from: http:///
register 2-69: slpcal2: sleep calibra tion 2 register (address: 0x20b) r-0 r/w-0 r/w-0 w-0 r-0 r-0 r-0 r-0 slpcalrdy r r slpcalen slpcal19 slpcal18 slpcal17 slpcal16 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 slpcalrdy: slee p calibration ready bit 1 = slee p calibration count is complete bit 6-5 reserved: main tain as 0 bit 4 slpcalen: slee p calibration enable bit 1 = s tarts the sleep calibration co unter. automatica lly cleared to 0 by hardware bit 3-0 slpcal<19:16>: sleep cali bration counter bits 20-bit counter to calibrate the sleep clock (slp clk) pe riod. the counter contains the count of 16 slpclk periods. the slpclk period depends on the sleep clock selection (slpclksel), rfcon7<7:6> and sleep clock divisor (slpclkdiv ) slpcon1<4:0> bits. units: tick (50 ns). mrf24j40 ds39776c-page 68 preliminary ? 2010 microchip technology inc. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 69 mrf24j40 register 2-70: rfstate: rf state register (address: 0x20f) r-0 r-0 r-0 u-0 u-0 u-0 u-0 u-0 rfstate2 rfstate1 rfstate0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-5 rfstate<2:0>: rf s tate machine bits 111 = rtsel2 110 = rtsel1 101 = rx 100 = tx 011 = calvco 010 = sleep 001 = calfil 000 = reset bit 4-0 reserved: main tain as 0 register 2-71: rssi: averaged rssi value register (address: 0x210) r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 rssi7 (1) rssi6 (1) rssi5 (1) rssi4 (1) rssi3 (1) rssi2 (1) rssi1 (1) rssi0 (1) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 rssi<7:0>: a veraged rssi value bits (1) note 1: the number of rssi samples averaged, set by rssinumx (0x25<5:4>) bits. downloaded from: http:///
register 2-72: slpcon0: sleep clock control 0 register (address: 0x211) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r r r r r r intedge (1) slpclken bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-2 reserved: main tain as 0 bit 1 intedge: i nterrupt edge polarity bit (1) 1 = rising edge 0 = falling edge (default) bit 0 slpclken : sleep clock enable bit 1 = disab led 0 = enabled (default) note 1: ensure that the interrupt polarity matches the interrupt pin polarity on the host microcontroller. register 2-73: slpcon1: sleep clock control 1 register (address: 0x220) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r r clkouten slpclkdiv4 slpclkdiv3 slpclkdiv2 slpclkdiv1 slpclkdiv0 bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-6 reserved: maint ain as 0 bit 5 clkouten : clkout pin enable bit the clkout pin 26 feature has been discontinued. it is recommended that it be disabled. 1 = disable (recommended) 0 = enable (default) bit 4-0 slpclkdiv<4:0>: slee p clock divisor bits sleep clock is divided by 2 n , where n = slpclkdiv. (1) default value: 0x00. note 1: if the sleep clock selection, slpclksel (0x207<7:6), is the inter nal oscillator (100 khz), set slpclkdiv to a minimum value of 0x01. mrf24j40 ds39776c-page 70 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-74: waketimel: wake-up time match value low register (address: 0x222) r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-1 r/w-0 waketime7 (1) waketime6 (1) waketime5 (1) waketime4 (1) waketime3 (1) waketime2 (1) waketime1 (1) waketime0 (1) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 waketime<7:0>: w ake time match value bits (1) waketime is an 11-bit value that is compared with the main counter (maincnt) to si gnal the time to enable (wake-up) the 20 mhz main oscillator when the mrf24j40 is using the sleep mode timers. default value: 0x00a. minimum value: 0x001. note 1: rule: w aketime > wakecnt. register 2-75: waketimeh: wake-up time match value high register (address: 0x223) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r r r r r waketime10 (1) waketime9 (1) waketime8 (1) bit 7 bit 0 legend: r = reserved r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-3 reserved: maintain as 0 bit 2-0 waketime<10:8>: w ake-up time counted by slpclk bits (1) waketime is an 11-bit value that is compared with the main counter (maincnt) to signal the time to enable (wake-up) the 20 mhz main oscillator w hen the mrf24j40 is using the sleep mode timers. default value: 0x00a. minimum value: 0x001. note 1: rule: waketime > wakecnt. ? 2010 microchip technology inc. preliminary ds39776c-page 71 mrf24j40 downloaded from: http:///
register 2-76: remcntl: remain co unter low register (address: 0x224) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 remcnt7 remcnt6 remcnt5 remcnt4 remcnt3 remcnt2 remcnt1 remcnt0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 remcnt<7:0>: re main counter bits remain counter is a 16-bit counte r . together with the main counter times events: beacon interval (bi) and inactive period for beacon-enabled devices and sleep interval for nonbeacon-enabled devices. units: tick (50 ns). register 2-77: remcnth: remain counter high register (address: 0x225) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 remcnt15 remcnt14 remcnt13 remcnt12 remcnt11 remcnt10 remcnt9 remcnt8 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 remcnt<15:8>: re main counter bits remain counter is a 16-bit counter. together with the main counter times even t s: beacon interval (bi) and inactive period for beacon-enabled devices and sleep interval for nonbeacon-enabled devices. units: tick (50 ns). mrf24j40 ds39776c-page 72 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-78: maincnt0: main co unter 0 register (address: 0x226) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 maincnt7 maincnt6 maincnt5 maincnt4 maincnt3 maincnt2 maincnt1 maincnt0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 maincnt<7:0>: main counter bits main counter is a 26-bit counter. together with the remain counter times events: beacon interval (bi) and inactive period for beacon-enabled devices and sleep interval for nonbeacon-enabled devices. units: slpclk. (1) note 1: sleep clock (slpclk) period dep ends on the sleep clo ck selection (slpclksel ) rfcon<7:6> and sleep clock divisor (slpclkdiv) clkcon<4:0> bits. register 2-79: maincnt1: main co unter 1 register (address: 0x227) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 maincnt15 maincnt14 maincnt13 maincnt12 maincnt11 maincnt10 maincnt9 maincnt8 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 maincnt<15:8>: mai n counter bits main counter is a 26-bit counter. together with the remain counter times events : beacon interval (bi) and inactive period for beacon-enabled devices and sleep interval for nonbeacon-enabled devices. units: slpclk. (1) note 1: sleep clock (slpclk) period dep ends on the sleep clo ck selection (slpclksel ) rfcon<7:6> and sleep clock divisor (slpclkdiv) clkcon<4:0> bits. ? 2010 microchip technology inc. preliminary ds39776c-page 73 mrf24j40 downloaded from: http:///
register 2-80: maincnt2: main counter 2 register (address: 0x228) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 maincnt23 maincnt22 maincnt21 maincnt20 maincnt19 maincnt18 maincnt17 maincnt16 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 maincnt<23:16>: mai n counter bits main counter is a 26-bit counter. together with th e remain counter times events: beacon interval (bi) and inactive period for beacon-enabled devices and sleep interval for nonbeacon-enabled devices. units: slpclk. (1) note 1: sleep clock (slpclk) period depends on the sleep clock selection (slpclksel) rfcon<7:6> and sleep clock divisor (slpclkdiv) clkcon<4:0> bits. register 2-81: maincnt3: main counter 3 register (address: 0x229) w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 startcnt r r r r r maincnt25 maincnt24 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7 startcnt: s tart sleep mode counters bits 1 = trigger sleep mode for nonbeacon enable mode (bo = 0xf and slotted = 0 ). bit automatically clears to 0 . bit 6-2 reserved: maintain as 0 bit 1-0 maincnt<25:24>: mai n counter bits main counter is a 26-bit counter. together with the remain counter times events: beacon interval (bi) and i nactive period for beacon-enabled devices and sleep interval for nonbeacon-enabled devices. units: slpclk. (1) note 1: sleep clock (slpclk) period depends on the sleep clock selection (slpclksel) rfcon<7:6> and sleep clock divisor (slpclkdiv) clkcon<4:0> bits. mrf24j40 ds39776c-page 74 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-82: testmode: test mode register (address: 0x22f) r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-0 r r r rssiwait1 rssiwait0 testmode2 testmode1 testmode0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-5 reserved: maint ain as 0 bit 4-3 rssiwait<1:0>: rssi s tate machine parameter bits 01 = opti mized value (default) bit 2-0 testmode<2:0>: t est mode bits 111 = gpio0, gpio1 and gpio2 are configured to control an external pa and/or lna (1) 101 = single tone test mode 000 = normal operation (default) note 1: refer to section 4.2 external pa/lna control for more information. ? 2010 microchip technology inc. preliminary ds39776c-page 75 mrf24j40 downloaded from: http:///
register 2-83: assoeadr0: associated coordinator extended address 0 register (address: 0x230) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 assoeadr7 assoeadr6 assoeadr5 assoeadr4 assoeadr3 assoeadr2 assoeadr1 assoeadr0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 assoeadr<7:0>: 64-bit extended address of associated coordinator bits register 2-84: assoeadr1: associated coordinator extended address 1 register (address: 0x231) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 assoeadr15 assoeadr14 assoeadr13 assoeadr12 assoeadr11 assoeadr10 assoeadr9 assoeadr8 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 assoeadr<15:8>: 64 -bit extended address of associated coordinator bits mrf24j40 ds39776c-page 76 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-85: assoeadr2: associat ed coordinator extended address 2 register (address: 0x232) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 assoeadr23 assoeadr22 assoeadr21 assoeadr20 assoeadr19 assoeadr18 assoeadr17 assoeadr16 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 assoeadr<23:16>: 64-bit extended address of associated coordinator bits register 2-86: assoeadr3: associat ed coordinator extended address 3 register (address: 0x233) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 assoeadr31 assoeadr30 assoeadr29 assoeadr28 assoeadr27 assoeadr26 assoeadr25 assoeadr24 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 assoeadr<31:24>: 64-bit extended address of associated coordinator bits ? 2010 microchip technology inc. preliminary ds39776c-page 77 mrf24j40 downloaded from: http:///
register 2-87: assoeadr4: associated coordinator extended address 4 register (address: 0x234) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 assoeadr39 assoeadr38 assoeadr37 assoeadr36 assoeadr35 assoeadr34 assoeadr33 assoeadr32 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 assoeadr<39:32>: 64-bit extended address of associated coordinator bits register 2-88: assoeadr5: associated coordinator extended address 5 register (address: 0x235) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 assoeadr47 assoeadr46 assoeadr45 assoeadr44 assoeadr43 assoeadr42 assoeadr41 assoeadr40 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 assoeadr<47:40>: 64-bit extended address of associated coordinator bits mrf24j40 ds39776c-page 78 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-89: assoeadr6: associat ed coordinator extended address 6 register (address: 0x236) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 assoeadr55 assoeadr54 assoeadr53 assoeadr52 assoeadr51 assoeadr50 assoeadr49 assoeadr48 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 assoeadr<55:48>: 64-bit extended address of associated coordinator bits register 2-90: assoeadr7: associat ed coordinator extended address 7 register (address: 0x237) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 assoeadr63 assoeadr62 assoeadr61 assoeadr60 assoeadr59 assoeadr58 assoeadr57 assoeadr56 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 assoeadr<63:56>: 64-bit extended address of associated coordinator bits ? 2010 microchip technology inc. preliminary ds39776c-page 79 mrf24j40 downloaded from: http:///
register 2-91: assosadr0: associated coordinator short address 0 register (address: 0x238) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 assosadr7 assosadr6 assosadr5 assosadr4 assosadr3 assosadr2 assosadr1 assosadr0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 assosadr<7:0>: 1 6-bit short address of associated coordinator bits register 2-92: assosadr1: associated coordinator short address 1 register (address: 0x239) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 assosadr15 assosadr14 assosadr13 assosadr12 assosadr11 assosadr10 assosadr9 assosadr8 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 assosadr<15:8>: 16 -bit short address of associated coordinator bits mrf24j40 ds39776c-page 80 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-93: upnonce0: upper nonc e security 0 register (address: 0x240) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce7 upnonce6 upnonce5 upnonce4 upnonce3 upnonce2 upnonce1 upnonce0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<7:0>: u pper nonce bits 13-byte nonce value used in security. register 2-94: upnonce1: upper nonc e security 1 register (address: 0x241) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce15 upnonce14 upnonce13 upnonce12 upnonce11 upnonce10 upnonce9 upnonce8 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<15:8>: upp er nonce bits 13-byte nonce value used in security. ? 2010 microchip technology inc. preliminary ds39776c-page 81 mrf24j40 downloaded from: http:///
register 2-95: upnonce2: upper nonce security 2 register (address: 0x242) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce23 upnonce22 upnonce21 upnonce20 upnonce19 upnonce18 upnonce17 upnonce16 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<23:16>: uppe r nonce bits 13-byte nonce value used in security. register 2-96: upnonce3: upper nonce security 3 register (address: 0x243) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce31 upnonce30 upnonce29 upnonce28 upnonce27 upnonce26 upnonce25 upnonce24 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<31:24>: upp er nonce bits 13-byte nonce value used in security. mrf24j40 ds39776c-page 82 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-97: upnonce4: upper nonc e security 4 register (address: 0x244) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce39 upnonce38 upnonce37 upnonce36 upnonce35 upnonce34 upnonce33 upnonce32 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<39:32>: up per nonce bits 13-byte nonce value used in security. register 2-98: upnonce5: upper nonc e security 5 register (address: 0x245) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce47 upnonce46 upnonce45 upnonce44 upnonce43 upnonce42 upnonce41 upnonce40 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<47:40>: upp er nonce bits 13-byte nonce value used in security. ? 2010 microchip technology inc. preliminary ds39776c-page 83 mrf24j40 downloaded from: http:///
register 2-99: upnonce6: upper nonce security 6 register (address: 0x246) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce55 upnonce54 upnonce53 upnonce52 upnonce51 upnonce50 upnonce49 upnonce48 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<55:48>: up per nonce bits 13-byte nonce value used in security. register 2-100: upnonce7: upper nonce security 7 register (address: 0x247) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce63 upnonce62 upnonce61 upnonce60 upnonce59 upnonce58 upnonce57 upnonce56 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<63:56>: up per nonce bits 13-byte nonce value used in security. mrf24j40 ds39776c-page 84 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-101: upnonce8 : upper nonce security 8 register (address: 0x248) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce71 upnonce70 upnonce69 upnonce68 upnonce67 upnonce66 upnonce65 upnonce64 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<71:64>: up per nonce bits 13-byte nonce value used in security. register 2-102: upnonce9 : upper nonce security 9 register (address: 0x249) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce79 upnonce78 upnonce77 upnonce76 upnonce75 upnonce74 upnonce73 upnonce72 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<79:72>: uppe r nonce bits 13-byte nonce value used in security. ? 2010 microchip technology inc. preliminary ds39776c-page 85 mrf24j40 downloaded from: http:///
register 2-103: upnonce10: upper nonce security 10 register (address: 0x24a) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce87 upnonce86 upnonce85 upnonce84 upnonce83 upnonce82 upnonce81 upnonce80 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<87:80>: u pper nonce bits 13-byte nonce value used in security. register 2-104: upnonce11: upper nonce security 11 register (address: 0x24b) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce95 upnonce94 upnonce93 upnonce92 upnonce91 upnonce90 upnonce89 upnonce88 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<95:88>: upp er nonce bits 13-byte nonce value used in security. mrf24j40 ds39776c-page 86 preliminary ? 2010 microchip technology inc. downloaded from: http:///
register 2-105: upnonce12: upper nonce security 12 register (address: 0x24c) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 upnonce103 upnonce102 upnonce101 upnonce100 upnonce99 upnonce98 upnonce97 upnonce96 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-0 upnonce<103:96>: up per nonce bits 13-byte nonce value used in security. ? 2010 microchip technology inc. preliminary ds39776c-page 87 mrf24j40 downloaded from: http:///
mrf24j40 ds39776c-page 88 preliminary ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 89 mrf24j40 3.0 functional description 3.1 reset the mrf24j40 has four reset types: power-on reset C the mrf24j40 has built-in power-o n reset circuitry that will automatically reset all control registers when power is applied. it is recommended to delay 2 ms after a reset before accessing the mrf24j40 to allow the rf circuitry to start up and stabilize. reset pin C the mrf24j40 can be reset by the host microcontroller by asserting the reset pin 13 low. all control registers will be reset. the mrf24j40 will be released from reset approxi - mately 250 s af ter reset is released. the reset pin has an internal weak pull-up resistor. it is recommended to delay 2 ms after a reset before accessing the mrf24j40 to allow the rf circuitry to start up and stabilize. software reset C a software reset can be performed by the host microcontroller. the power mana gement circuitry is reset by setting the rstpwr (0x2a<2>) bit to 1 . the control registers retain their values. the baseband circuitry is reset by se tting the rstbb (0x2a<1>) bit to 1 . the control registers retain their values. the mac circuitry is reset by setting the rstmac (0x2a<0>) bit to 1 . all control registers will be reset. the resets can be performed individually or together. the bit(s) will be automatically cleared to 0 by hardware. no delay is necessary after a software reset. rf state machine reset C perform an rf state machine reset by setting to 1 the rfrst (rfctl 0x36<2>) bit and then clearing to 0 . delay at least 192 s after performing to allow the rf circuitry to calibrate. the control registers retain their values. note: the rf state machine should be reset after the frequency channel has been changed (rfcon0 0x200). table 3-1: registers associated with reset addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x2a softrst r r r r r rstpwr rstbb rstmac 0x36 rfctl r r r wakecnt8 wakecnt7 rfrst rftxmode rfrxmode downloaded from: http:///
mrf24j40 ds39776c-page 90 preliminary ? 2010 microchip technology inc. 3.2 initialization certain control register values must be initialized for basic operations. these values differ from the power-on reset values and provide improved opera - tional parameters. these settings are normally made once after a reset. after initialization, mrf24j40 features can be configured for the application. the steps for initialization are shown in example 3-1 . example 3-1: initializing the mrf24j40 table 3-2: registers associ ated w ith initialization addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x18 pacon2 fifoen r txonts3 txonts2 txonts1 txonts0 txont8 txont7 0x2a softrst r r r r r rstpwr rstbb rstmac 0x2e txstbl rfstbl3 rfstbl2 rfstbl1 rfstbl0 msifs3 msifs2 msifs1 msifs0 0x201 rfcon1 vcoopt7 vcoopt6 vcoopt5 vcoopt4 vcoopt3 vcoopt2 vcoopt1 vcoopt0 0x202 rfcon2 pllen r r r r r r r 0x206 rfcon6 txfil r r 20mrecvr baten r r r 0x207 rfcon7 slpclksel1 slpscksel0 r r r r r r 0x208 rfcon8 r r r rfvco r r r r 0x220 slpcon1 r r clkouten slpclkdiv4 slpclkdiv3 slpclkdiv2 slpclkdiv1 slpclkdiv0 example steps to initialize the mrf24j40: 1. softrst (0x2a) = 0x07 C perform a software re set. the bits will be automatically cleared to 0 by hardware. 2. pacon2 (0x18) = 0x98 C initialize fifoen = 1 and txonts = 0x6. 3. txstbl (0x2e) = 0x95 C initialize rfstbl = 0x9. 4. rfcon0 (0x200) = 0x03 C initialize rfopt = 0x03. 5. rfcon1 (0x201) = 0x01 C initialize vcoopt = 0x02. 6. rfcon2 (0x202) = 0x80 C enable pll (pllen = 1 ). 7. rfcon6 (0x206) = 0x90 C initialize txfil = 1 and 20mrecvr = 1 . 8. rfcon7 (0x207) = 0x80 C initialize slpc lksel = 0x2 (100 khz internal oscillator). 9. rfcon8 (0x208) = 0x10 C initialize rfvco = 1 . 10. slpcon1 (0x220) = 0x21 C initialize clkouten = 1 and slpclkdiv = 0x01. configuration for nonbeacon-enabled devices (see section 3.8 beacon-enabled and nonbeacon-enabled networks ): 11. bbreg2 (0x3a) = 0x80 C set cca mode to ed. 12. ccaedth = 0x60 C set cca ed threshold. 13. bbreg6 (0x3e) = 0x40 C set appended rssi value to rxfifo. 14. enable interrupts C see section 3.3 interrupts . 15. set channel C see section 3.4 channel selection . 16. set transmitter power - see register 2-62: rf control 3 register (address: 0x203). 17. rfctl (0x36) = 0x04 C reset rf state machine. 18. rfctl (0x36) = 0x00. 19. delay at least 192 s. note: maintain 0x200<3:0> = 0x03 downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 91 mrf24j40 3.3 interrupts the mrf24j40 has one interrupt (int) pin 16 that signals one of eight interrupt events to the host microcontroller. the interrupt structure is shown in figure 3-1 . interrupts are enabled via the intcon (0x32) register. interrupt flags are located in the in tstat (0x31) register. the intstat register clears-to-zero upon read. therefore, the host microcontroller should read and store the intstat register and check the bits to determine which interrupt occurred. the int pin will continue to signal an interrupt until the intstat register is read. the edge polarity of the int pin is configured via the intedge bit in the slpcon0 (0x211<1>) register. note 1: the intedge polarity defaults to: 0 = falling edge. ensure that the inter - rupt polarity matches the interrupt pin polarity of the host microcontroller. 2: t he int pin will remain high or low, depending on intedge polarity setting, until intstat register is read. figure 3-1: mrf24j40 intcon.slpie intstat.slpif intcon.wakeie intstat.wakeif intcon.hsymtmrie intstat.hsymtmrif intcon.secie intstat.secif intcon.rxie intstat.rxif intcon.txg2ie intstat.txg2if intcon.txg1ie intstat.txg1if intcon.txnie intstat.txnif int slpcon0.intedge interrupt logic table 3-3: registers asso cia ted with interrupts addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x31 intstat slpif wakeif hsymtmrif secif rxif txg2if txg1if txnif 0x32 intcon slpie wakeie hsymtmrie secie rxie txg2ie txg1ie txnie 0x211 slpcon0 r r r r r r intedge slpcken downloaded from: http:///
mrf24j40 ds39776c-page 92 preliminary ? 2010 microchip technology inc. 3.4 channel selection the mrf24j40 is capable of selecting one of sixteen channel frequencies in the 2.4 ghz band. the desired channel is selected by configuring the channel bits in the rfcon0 (0x200<7:4>) register. see table 3-4 for the rfcon0 register setting for channel number and frequency. note: perform an rf state machine reset (see section 3.1 reset ) after a channel frequency change. then, delay at least 192 s after the rf state machine reset, to allow the rf circuitry to calibrate. table 3-4: channel selection rfcon0 (0x200) register setting channel number frequency set value 11 2.405 ghz 0x03 12 2.410 ghz 0x13 13 2.415 ghz 0x23 14 2.420 ghz 0x33 15 2.425 ghz 0x43 16 2.430 ghz 0x53 17 2.435 ghz 0x63 18 2.440 ghz 0x73 19 2.445 ghz 0x83 20 2.450 ghz 0x93 21 2.455 ghz 0xa3 22 2.460 ghz 0xb3 23 2.465 ghz 0xc3 24 2.470 ghz 0xd3 25 2.475 ghz 0xe3 26 2.480 ghz 0xf3 table 3-5: registers associated with channel selection addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x36 rfctl r r r wakecnt8 wakecnt7 rfrst rftx - mode rfrx - mode 0x200 rfcon0 channel3 channel2 channel1 channel0 rfopt3 rfopt2 rfopt1 rfopt0 downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 93 mrf24j40 3.5 clear channel assessment (cca) the cca signal is an indication to the mac layer from the phy layer as to whether the medium is busy or idle. the mrf24j40 provides three methods of performing cca. refer to ieee 802.15.4-2003 standard, section 6.7.9 cca. 3.5.1 cca mode 1: energy above threshold cca reports a busy medium upon detecting energy above the energy detection (ed) threshold. 1. program ccamode 0x3a<7:6> to the value, 10 . 2. program ccaedth 0x3f<7:0> with cca ed th reshold value (rssi value). the 8-bit ccaedth threshold can be mapped to a power level acco rding to rssi. refer to section 3.6 received signal strength indicator (rssi)/energy detection (ed) . 3.5.2 cca mode 2: carrier sense only cca reports a busy medium only upon detection of a signal with the modulation and spreading characteris - tics of ieee 802.15.4. this signal may or may not be above the ed threshold. 1. program ccamode 0x3a<7:6> to the value, 01 . 2. program ccacsth 0x3a<5:2> with the cca carrier sense thresho ld (units). 3.5.3 cca mode 3: carrier sense with energy above threshold cca reports a busy medium only upon detection of a signal with modulation or spreading characteristics of ieee 802.15.4 with energy above the ed threshold. 1. program ccamode 0x3a<7:6> to the value, 11 . 2. program ccacsth 0x3a<5:2> with the cca carrier sense threshold. 3. program ccaedth 0x3f<7:0> with the cca ed th reshold (rssi value). the 8-bit ccaedth threshold can be mapped to a power level according to rssi. refer to section 3.6 received signal strength indicator (rssi)/energy detection (ed) . table 3-6: registers associated with cca addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x3a bbreg2 ccamode1 ccamode0 ccacsth3 ccacsth2 ccacsth1 ccacsth0 r r 0x3f ccaedth ccaedth7 ccaedth6 ccaedth5 ccaedth4 ccaedth3 ccaedth2 ccaedth1 ccaedth0 downloaded from: http:///
mrf24j40 ds39776c-page 94 preliminary ? 2010 microchip technology inc. 3.6 received signal strength indicator (rssi)/energy detection (ed) rssi/ed are an estimate of the received signal power within the bandwidth of an ieee 802.15.4 channel. the rssi value is an 8-bit value ranging from 0-255. the mapping between the rssi values with the received power level is shown in figure 3-3 and is shown in tabular form in ta b l e 3-8 . the number of symbols to average can be changed by programming the rssinum (tx bcon1 0x25<5:4>) bits. the programmer can obtain the rssi/ed value in one of two methods. 3.6.1 rssi firmware request (rssi mode1) in this mode, the host mi crocontroller sends a request to calculate rssi, then waits until it is done and then reads the rssi value. the steps are: 1. set rssimode1 0x3e<7> C initiate rssi calcu lation. 2. wait until rssirdy 0x3e<0> is set to 1 C rssi calculation is complete. 3. read rssi 0x210<7:0> C the rssi register cont ains the averaged rssi received power level for 8 symbol periods. 3.6.2 appended rssi to the received packet (rssi mode 2) the rssi value is appended at the end of each successfully received packet. to enable rssi mode 2, set rssimode2 = 1 (0x3e<6>). th e rssi value will be appended to the rxfifo as shown in figure 3-2 . figure 3-2: packet format in rx fifo 1 octet n octets m octets 2 octets 1 octet 1 octet frame length header payload fcs lqi rssi table 3-7: registers associated with rssi/ed addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x25 txbcon1 txbmsk wu /bcn rssinum1 rssinum0 r r r r 0x3e bbreg6 rssimode1 rssimode2 r r r r r rssirdy 0x210 rssi rssi7 rssi6 rssi5 rssi4 rssi3 rssi2 rssi1 rssi0 downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 95 mrf24j40 figure 3-3: rssi vs. received power (dbm) -50 0 50 100 150 200 250 300 -120 -100 -80 -60 -40 -20 0 received power (dbm) rssi downloaded from: http:///
mrf24j40 ds39776c-page 96 preliminary ? 2010 microchip technology inc. rssi versus received power (db) is shown in tabular form in ta b l e 3-8 table 3-8: rssi vs. received power (db) received power (dbm) rssi value (hex) rssi value (dec) -100 0x0 0 -99 0x0 0 -98 0x0 0 -97 0x0 0 -96 0x0 0 -95 0x0 0 -94 0x0 0 -93 0x0 0 -92 0x0 0 -91 0x0 0 -90 0x0 0 -89 0x1 1 -88 0x2 2 -87 0x5 5 -86 0x9 9 -85 0x0d 13 -84 0x12 18 -83 0x17 23 -82 0x1b 27 -81 0x20 32 -80 0x25 37 -79 0x2b 43 -78 0x30 48 -77 0x35 53 -76 0x3a 58 -75 0x3f 63 -74 0x44 68 -73 0x49 73 -72 0x4e 78 -71 0x53 83 -70 0x59 89 -69 0x5f 95 -68 0x64 100 -67 0x6b 107 -66 0x6f 111 -65 0x75 117 -64 0x79 121 -63 0x7d 125 -62 0x81 129 -61 0x85 133 -60 0x8a 138 -59 0x8f 143 -58 0x94 148 -57 0x99 153 -56 0x9f 159 -55 0xa5 165 -54 0xaa 170 -53 0xb0 176 -52 0xb7 183 -51 0xbc 188 -50 0xc1 193 -49 0xc6 198 -48 0xcb 203 -47 0xcf 207 -46 0xd4 212 -45 0xd8 216 -44 0xdd 221 -43 0xe1 225 -42 0xe4 228 -41 0xe9 233 -40 0xef 239 -39 0xf5 245 -38 0xfa 250 -37 0xfd 253 -36 0xfe 254 -35 0xff 255 -34 0xff 255 -33 0xff 255 -32 0xff 255 -31 0xff 255 -30 0xff 255 -29 0xff 255 -28 0xff 255 -27 0xff 255 -26 0xff 255 -25 0xff 255 -24 0xff 255 -23 0xff 255 -22 0xff 255 -21 0xff 255 -20 0xff 255 . table 3-8: rssi vs. received power (db) (continued) received power (dbm) rssi value (hex) rssi value (dec) downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 97 mrf24j40 3.7 link quality indication (lqi) link quality indication (lqi) is a characterization of strength or quality of a received packet. several metrics, for example, rssi, signal to noise ratio (snr), rssi combined with snr, etc., can be used for measuring link quality. using rssi or snr alone may not be the best way to estimate the quality of a link. the received rssi value will be a very high value if a packet is received with greater signal strength or even if an interferer is present in the channel. hence, for better approximation of link quality, the mrf24j40 reports the correlation degree between spreading sequences and the incoming chips during the reception of a packet. this correlation value is directly mapped to a range of 0-255 (256 values), where an lqi value of 0 indicates that the quality of the link is very low, and an lqi value of 255 indicates the quality of the link is very high. the correlation degree between spreading sequences and incoming chips is computed over a period of 3 symbol periods during the reception of the preamble of a packet. the lqi is reported along with each received packet in the rx fifo as shown in figure 3-2 . 3.8 beacon-enabled and nonbeacon-enabled networks the ieee 802.15.4 standard defines two modes of operation: beacon-enabled network nonbeacon-enabled network 3.8.1 beacon-enabled network in a beacon-enabled network, beacons will be transmit - ted periodically by the pan coordinator. these beacons are mainly used to provide synchronization services between all the devices in the pan and also to support other extended features, like guaranteed time slots (gts), a quality of service (qos) mechanism for the ieee 802.15.4 standard. the pan coordinator defines the structure of the superframe using beacons. downloaded from: http:///
mrf24j40 ds39776c-page 98 preliminary ? 2010 microchip technology inc. 3.8.1.1 superframe structure the superframe structure is shown in figure 3-4 . a superframe is bounded by the transmission of a bea con frame and can have an active and inactive portion. the coordinator will interact with its pan only during the active portion of the superframe, and during the inactive portion of the superframe, the coordinator can go to a low-power mode. the active portion of the superframe is divided into 16 equally spaced slots and is composed of three parts: a beacon, a contention access period (cap) and an optional contention free period (cfp). the structure of the superframe depends on the values of beacon order (bo) and superframe order (so). the cfp, if present, follows immediately after the cap and extends to the end of active portion of the superframe. any allocated gtss shall be located in the cfp of the active portion of the superframe. all the frames transmitted in the cap, except acknowl edgement frames and data frames that imme - diately follow the data request command, must use slotted csma-ca. refer to section 3.9 carrier sense multiple access-collision avoidance (csma-ca) algorithm for more information. figure 3-4: superframe structure 0 1 2 3 4 5 6 7 8 gts1 g t s 2 gts3 inactive portion active portion cap cfp slot backoff period ( aunitbackoffperiod = 20 symbols) inactive portion beacon gts end slots = eslotg23 (0x1e), eslotg45 (0x1f), eslot67 (0x20) beacon cap end slot = eslotg1 (0x13<3:0>) 0123456789101112131415 sd superframe duration (sd) = abasesuperframeduration * 2 so symbols (so C order 0x10<3:0>) bi beacon interval (bi) = abasesuperframeduration * 2 bo symbols (bo C order 0x10<7:4>) downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 99 mrf24j40 3.8.1.2 bo and so values of beacon order (bo) and superframe order (so) determine the beacon interval (bi) and superframe duration (sd). beacon interval (bi) in terms of bo can be expressed as: bi = abasesuperframeduration * 2 bo similarly, superframe duration (sd) in terms of so can be expressed as: sd = abasesuperframeduration * 2 so where abasesuperframeduration = 960 symbols. bo and so can be configur ed by programming t he bo (0x10<7:4>) bits and so (0x10<3:0>) bits in the order register. for beacon-enabled networks, the values of bo and so should be in the range, 0 so bo 14. if the values of bo and so are equal, then the superframe does not have any inactive portion. a beacon interval can be as short as 15 ms or a long as 251 seconds based on the values of bo and so. 3.8.1.3 gts if a device wants to transmit or receive during cfp, it sends out a gts request in the cap to the pan coor - dinator. the pan coordinator broadcasts the address of the device number for that device in the beacon frame if resources are available. to support gts operation, mrf24j40 uses t xgts1fifo and txgts2fifo. the txgts1fifo and txgts2fifo are ping-pong fifos and can be assigned to different gts slots or to the same slots. if both are assigned to the same slot, they take turns for transmission within that slot. txgts1fifo and txgts2fifo can be triggered ahead of their slot time, but transmission from the fifo will take place exactly at the assigned slot time. refer to section 3.12 transmission for information on how to transmit a data frame using the tx gtsxfifos. figure 3-5: gtsfifo state diagram gtsswitch = 1 switch txgtsxfifo if transmit error txgts1fifo txgts2fifo wait for gts slot wait for gts slot transmit complete or transmit error (clear txg1trig) transmit complete or transmit error (clear txg2trig) txgts1fifo txgts2fifo wait for gts slot wait for gts slot transmit complete transmit complete hold and wait until next gts transmit error (clear txg1trig and txg2trig) transmit error (clear txg1trig and txg2trig) gtsswitch = 0 hold and wait txgtsxfifo if transmit error downloaded from: http:///
mrf24j40 ds39776c-page 100 preliminary ? 2010 microchip technology inc. 3.8.1.4 configuring beacon-enabled pan coordinator the following steps configure the mrf24j40 as a coordinator in a beacon-enabled network: 1. set the pancoord (rxmcr 0x00<3>) bit = 1 to configure as pan coordinator. 2. set the slotted (txmcr 0x11<5>) bit = 1 to use slotted csma-ca mode. 3. load the beacon frame into the txbfifo (0x080-0x0ff). 4. set the txbmsk (txbcon1 0x25<7>) bit = 1 to mask the beacon interrupt mask. 5. set intl (wakecon 0x22<5:0>) value to 0x03 . 6. program the cap end slot (eslotg1 0x13<3 :0>) value. if the coordinator supports guaranteed time slot operation, refer to section 3.8.1.5 configuring beacon-enabled gts settings for pan coordinator below. 7. calibrate the sleep clock (slpclk) frequency. re fer to section 3.15.1.2 sleep clock calibration . 8. set wakecnt (slpack 0x35<6:0>) value = 0x5f to set the main oscillator (20 mhz) st art-up timer value. 9. program the beacon interval into the main coun - ter, maincnt (0x229<1:0>, 0x228, 0x227, 0x226 ), and remain counter, remcnt (0x225, 0x224), according to bo and so values. refer to section 3.15.1.3 sleep mode counters . 10. configure the bo (order 0x10<7:4>) and so (ord er 0x10<3:0>) values. after configuring bo and so, the beacon frame will be sent immediately. 3.8.1.5 configuring beacon-enabled gts settings for pan coordinator the following steps configure the mrf24j40 as a coordinator in a beacon-enabled network with guaranteed time slots: 1. set the gtson (gateclk 0x26 <3>) bit = 1 to enable the gts fifo clock. 2. based on the number of gtss that are active for t he current superframe, program the end slot value of each gts into the eslot registers as shown in table 3-9 . table 3-9: programming end slot values gts number register cap eslotg1 0x13<3:0> gts1 eslotg1 0x13<7:4> gts2 eslotg23 0x1e<3:0> gts3 eslotg23 0x1e<7:4> gts4 eslotg45 0x1f<3:0> gts5 eslotg45 0x1f<7:4> gts6 eslotg67 0x20<3:0> gts7 if 7 th gts exists, the end slot must be 15 3. set the gtsswitch (txpend 0x21<1>) bit = 1 so that if a txgts1fifo or txgts2fifo trans - mission error occurs, it will switch to another txgtsxfifo. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 101 mrf24j40 3.8.1.6 configuring beacon-enabled device the following steps configure the mrf24j40 as a device in a beacon-enabled network: 1. set the slotted (txmcr 0x11<5>) bit = 1 to use slotted csma-ca mode. 2. set the offset (frm o ffset 0x23<7:0>) value = 0x15 for optimum timing alignment. 3. calibrate the sleep clock (slpclk) fre - quency. refer to section 3.15.1.2 sleep clock calibration . 4. program the associated coordinators 64-bit extended address to the assoeadr registers (0x230-0x237). 5. program the associated coordinators 16-bit short addr ess to the assosadr registers (0x238-0x239). note: the device will align its beacon frame with the associated coordinators beacon frame only when the source address matches the assoeadr or assosadr value. 6. parse the received associated coordinators bea con frame and extract the values of bo and so. calculate the inactive period and program the main counter, maincnt (0x229<1:0>, 0x228, 0x227, 0x226), and remain counter, remcnt (0x225, 0x224), according to the bo and so values. refer to section 3.15.1.3 sleep mode counters . 7. program the cap end slot (eslotg1 0x13 <3:0>) value. 3.8.1.7 configuring beacon-enabled gts settings for device the following steps configure the mrf24j40 as a device in a beacon-enabled network with guaranteed time slots: 1. set the gtson (gateclk 0x26<3>) bit = 1 to enable the gts fifo clock. 2. parse the received beacon frame and obtain the gt s allocation information. program the end slot value of the cap and each gts into the eslot registers, as shown in table 3-9 . 3. set the gtsswitch (txpend 0x21<1>) bit = 1 so that if a txgts1fifo or txgts2fifo trans - mission error occurs, it will switch to another txgtsxfifo. 3.8.2 nonbeacon-enabled network a nonbeacon-enabled network does not transmit a beacon unless it receives a beacon request, and hence, does not have any superframe structure. a nonbeacon-enabled network uses unslotted csma-ca to access the medium. the unslotted csma-ca is explained in section 3.9 carrier sense multiple access-collision avoidance (csma-ca) algo - rithm . for nonbeacon-enabled networks, both bo and so are set to 15. guaranteed time slots (gts) are not supported, an d generally, devices require less comput - ing power as there are no strict timing requirements that need to be met. 3.8.2.1 configuring nonbeacon-enabled pan coordinator the following steps configure the mrf24j40 as a coordinator in a nonbeacon-enabled network: 1. set the pancoord (rxmcr 0x00<3>) bit = 1 t o configure as the pan coordinator. 2. clear the slotted (txmcr 0x11<5>) bit = 0 t o configure unslotted csma-ca mode. 3. configure bo (order 0x10<7:4>) value = 0xf. 4. configure so (order 0x10<3:0>) value = 0xf. 3.8.2.2 configuring nonbeacon-enabled device the following steps configure the mrf24j40 as a device in a nonbeacon-enabled network: 1. clear the pancoord (rxmcr 0x00<3>) bit = 0 to configure as device. 2. clear the slotted (txmcr 0x11<5>) bit = 0 t o use unslotted csma-ca mode. downloaded from: http:///
mrf24j40 ds39776c-page 102 preliminary ? 2010 microchip technology inc. table 3-10: registers associated wi th setting up beacon-enabled and nonbeacon-enabled networks addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x00 rxmcr r r noackrsp r pancoord coord errpkt promi 0x10 order bo3 bo2 bo1 bo0 so3 so2 so1 so0 0x11 txmcr nocsma batlifext slotted macminbe1 macminb0 csmabf2 csmabf1 csmabf0 0x13 eslotg1 gts1-3 gts1-2 gts1-1 gts1-0 cap3 cap2 cap1 cap0 0x1e eslotg23 gts3-3 gts3-2 gts3-1 gts3-0 gts2-3 gts2-2 gts2-1 gts2-0 0x1f eslotg45 gts5-3 gts5-2 gts5-1 gts5-0 gts4-3 gts4-2 gts4-1 gts4-0 0x20 eslotg67 r r r r gts6-3 gts6-2 gts6-1 gts6-0 0x21 txpend mlifs5 mlifs4 mlifs3 mlifs2 mlifs1 mlifs0 gtsswitch fpack 0x22 wakecon immwake regwake intl intl intl intl intl intl 0x23 frmoffset offset7 offset6 offset5 offset4 offset3 offset2 offset1 offset0 0x25 txbcon1 txbmsk wu /bcn rssinum1 rssinum0 r r r r 0x26 gateclk r r r r gtson r r r 0x35 slpack slpack wakecnt6 wakecnt5 wakecnt4 wakecnt3 wakecnt2 wakecnt1 wakecnt0 0x224 remcntl remcnt7 remcnt6 remcnt5 remcnt4 remcnt3 remcnt2 remcnt1 remcnt0 0x225 remcnth remcnt15 remcnt14 remcnt13 remcnt12 remcnt11 remcnt10 remcnt9 remcnt8 0x226 maincnt0 maincnt7 maincnt6 maincnt5 maincnt4 maincnt3 maincnt2 maincnt1 maincnt0 0x227 maincnt1 maincnt15 maincnt14 maincnt13 maincnt12 maincnt11 maincnt10 maincnt9 maincnt8 0x228 maincnt2 maincnt23 maincnt22 maincnt21 maincnt20 maincnt19 maincnt18 maincnt17 maincnt16 0x229 maincnt3 startcnt r r r r r maincnt25 maincnt24 0x230 assoeadr0 assoeadr7 assoeadr6 assoeadr5 assoeadr4 assoeadr3 assoeadr2 assoeadr1 assoeadr0 0x231 assoeadr1 assoeadr15 assoeadr14 assoeadr13 assoeadr12 assoeadr11 assoeadr10 assoeadr9 assoeadr8 0x232 assoeadr2 assoeadr23 assoeadr22 assoeadr21 assoeadr20 assoeadr19 assoeadr18 assoeadr17 assoeadr16 0x233 assoeadr3 assoeadr31 assoeadr30 assoeadr29 assoeadr28 assoeadr27 assoeadr26 assoeadr25 assoeadr24 0x234 assoeadr4 assoeadr39 assoeadr38 assoeadr37 assoeadr36 assoeadr35 assoeadr34 assoeadr33 assoeadr32 0x235 assoeadr5 assoeadr47 assoeadr46 assoeadr45 assoeadr44 assoeadr43 assoeadr42 assoeadr41 assoeadr40 0x236 assoeadr6 assoeadr55 assoeadr54 assoeadr53 assoeadr52 assoeadr51 assoeadr50 assoeadr49 assoeadr48 0x237 assoeadr7 assoeadr63 assoeadr62 assoeadr61 assoeadr60 assoeadr59 assoeadr58 assoeadr57 assoeadr56 0x238 assosadr0 assosadr7 assosadr6 assosadr5 assosadr4 assosadr3 assosadr2 assosadr1 assosadr0 0x239 assosadr1 assosadr15 assosadr14 assosadr13 assosadr12 assosadr11 assosadr10 assosadr9 assosadr8 downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 103 mrf24j40 3.9 carrier sense multiple access-collision avoidance (csma-ca) algorithm mrf24j40 supports both unslotted and slotted csma-ca mechanisms, as defined in the ieee 802.15.4 standard. in both modes, the csma-c a algorithm is implemented using units of time called backoff periods. in slotted csma-ca, the back - off period boundaries of every device on the pan shall be aligned with the superframe slot boundaries of the pan coordinator. in unslotted csma-ca, the backoff periods of one device are not related in time to the backoff periods of any other device in the pan. refer to ieee 802.15.4-2003, section 7.5.1.3 the csma-ca algorithm for more informat ion. this section covers the two modes and their settings. note: acknowledgment and beacon frames are sent without using a csma-ca mechanism. 3.9.1 unslotted csma-ca mode figure 3-6 shows the unslotted csma-ca algorithm. this mode is used in a nonbeacon-enabled network whe re the backoff periods of one device are not related in time to the backoff periods of any other device in the network. refer to ieee 802. 15.4-2003, sect ion 7.5.1.3 the csma-ca algorithm for more information. configuring the mrf24j40 for nonbeacon-enabled network operation is covered in section 3.8.2 nonbeacon-enabled network . figure 3-6: unslotted csma-ca algorithm nb = 0, be = macminbe delay for random (2 be C 1) backoff periods perform cca channel idle? success (transmit pending packet) txnstat (txstat 0x24<0>) nb = nb + 1, be = min(be + 1, amaxbe ) nb > macmaxcsmabackoffs failure (report channel access failure to host microcontroller) ccafail (txstat 0x24<5>) n y n macminbe macminbe (txmcr 0x11<4:3>) macmaxcsmabackoffs csmabf (txmcr 0x11<2:0>) y start downloaded from: http:///
mrf24j40 ds39776c-page 104 preliminary ? 2010 microchip technology inc. to configure the mrf24j40 for unslotted csma-ca mode, clear slotted (txmcr 0x11<5>) bit = 0 . the macmi nbe and macmaxcsmabackoff values in the mrf24j40 are set to the ieee 802.15.4 standard defaults. to program their values: mac minbe C program macminbe (txmcr 0x11<4:3>) bits to a value between 0 and 3 (the ieee 802.15.4 standar d default is 3). mac maxcsmabackoff C program csmabf (txmcr 0x11<2:0>) bits to a value between 0 and 5 (the ieee 802.15.4 standard default is 4). 3.9.2 slotted csma-ca mode figure 3-7 shows the slotted csma-ca algorithm. this mode is used on a beacon-enabled network where the backof f period boundaries of every device on the network shall be aligned with the superframe slot boundaries of the pan coordinator. refer to ieee 802.15.4-2003, section 7.5.1.3 the csma-ca algorithm for more infor - mation. configuring the mrf24j40 for beacon-enabled network ope ration is covered in section 3.8.1 beacon-enabled network . figure 3-7: slotted csma-ca algorithm nb = 0, cw = 2 delay for random (2 be C 1) unit backoff periods perform cca on backoff period boundary channel idle? success (transmit pending packet) txnstat (txstat 0x24<0>) cw = 2, nb = nb + 1, be = min(be+1, amaxbe ) nb > macmaxcsmabackoffs ? failure (report channel access failure to host microcontroller) ccafail (txstat 0x24<5>) y n y n battery life extension? be = macminbe be = lesser(2, macminbe ) locate for backoff period boundary cw = cw C 1 cw = 0? y n y n battery life extension batlifext (txmcr 0x11<6>) start macmaxcsmabackoffs csmabf (txmcr 0x11<2:0>) macminbe macminbe (txmcr 0x11<4:3>) nb = 0, cw = 2 delay for random (2 be C 1) unit backoff periods perform cca on backoff period boundary channel idle? success (transmit pending packet) txnstat (txstat 0x24<0>) cw = 2, nb = nb + 1, be = min(be+1, amaxbe ) nb > macmaxcsmabackoffs ? failure (report channel access failure to host microcontroller) ccafail (txstat 0x24<5>) y n y n battery life extension? be = macminbe be = lesser(2, macminbe ) locate for backoff period boundary cw = cw C 1 cw = 0? y n y n battery life extension batlifext (txmcr 0x11<6>) start macmaxcsmabackoffs csmabf (txmcr 0x11<2:0>) macminbe macminbe (txmcr 0x11<4:3>) downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 105 mrf24j40 to configure the mrf24j40 for slotted csma-ca mode, set slotted (txmcr 0x11<5>) bit = 1 . to program the battery life extension bit in the slotted csma-c a mode, set batlifext (txmcr 0x11<6>) bit = 1 . the macminb e and macmaxcsmabackoff values are set to the ieee 802.15.4 standard defaults. to change their values: macminbe C program macminbe (txmcr 0x11<4:3>) bits to a value between 0 and 3 (the default is 3). macm axcsmabackoff C program csmabf (txmcr 0x11<2:0>) bits to a value between 0 and 5 (the default is 4). table 3-11: registers associated with csma-ca addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x11 txmcr nocsma batlifext slotted macminbe1 macminb0 csmabf2 csmabf1 csmabf0 downloaded from: http:///
mrf24j40 ds39776c-page 106 preliminary ? 2010 microchip technology inc. 3.10 interframe spacing (ifs) interframe spacing (ifs) allows the mac sublayer time to process data received by the phy. the length of the ifs period depends on the size of the frame that is to be transmitted. frames up to amaxsifsframesize (18 octets) in length shall be followed by a sifs period of at least a minsifsperiod (12) symbols. frames with lengths greater than amaxsifsframesize shall be fol - lowed by a lifs period of at least ami nlifsperiod (40) symbols. if the transm ission requires an acknowl - edgment, the ifs shall follow the acknowledgment frame. figure 3-8 shows the relationship between frames and ifs periods. refer to ieee 802.15.4-2003, sect ion 7.5.1.2 ifs for more information. the ieee 802.15.4 specification defines ami nsifsperiod as a constant value of 12 symbol periods. the aminsifsperiod can be programmed by the msifs (txstbl 0x 2e<3:0>) and rfstbl (txstbl 0x2e<7:4>) bits, where aminsifsperiod = msifs + rfstbl. the ieee 802.15. 4 s pecification defines aminlifsperiod as a constant value of 40 symbol periods. the aminlifsperiod can be programmed by the mlifs (txpend 0x21<7:2>) and rfstbl (txstbl 0x2e<7:4>) bits, where aminlifsperiod = mlfs + rfstbl. the ieee 802.15.4 spec ification defi nes aturn - aroundtime as a constant value of 12 symbol periods. the aturnaroundtime can be programmed by the turntime (txtime 0x27<7:4>) and rfstbl (txstbl 0x2e<7:4>) bits, where aturnaroundtime = turntime + rfstbl. figure 3-8: interframe spacing (ifs) long frame long frame ack short frame ack short frame t ack lifs t ack sifs lifs sifs where aturnaroundtime = t ack = ( aturnaroundtime + aunitbackoffperiod ) acknowledged transmission: unacknowledged transmission: table 3-12: registers asso ciated with interframe spacing addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x21 txpend mlifs5 mlifs4 mlifs3 mlifs2 mlifs1 mlifs0 gtsswitch fpack 0x27 txtime turntime3 turntime2 turntime1 turntime0 r r r r 0x2e txstbl rfstbl3 rfstbl2 rfstbl1 rfstbl0 msifs3 msifs2 msifs1 msifs0 downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 107 mrf24j40 3.11 reception an ieee 802.15.4 compliant packet is prefixed with a synchronization header (shr) containing the preamble sequence and start-of-frame delimiter (sfd) fields. the preamble sequence enables the receiver to achieve symbol synchronization. the mrf24j40 monitors incoming signals and looks fo r the preamble of ieee 802.15.4 packets. when a valid synchronization is obtained, the entire packet is demodulated and the crc is calculated and checked. the packet is accepted or rejected depending on the reception mode and frame filter, and placed in the rxfifo buffer. when the packet is placed in the rxfifo, a receive interrupt (rxif 0x31<3>) is issued. the rxfifo address mapping is shown in figure 3-9 . the following sections detail the reception operation of t he mrf24j40. figure 3-9: pack et reception ppdu on air packet phy packet structure packet to rxmac rxfifo address: (0x301 + m + n) to (0x301 + m + n + 1) (0x301 + m + n + 2) (0x301 + m + n + 3) 0x300 0x301 to (0x301 + m C 1) (0x301 + m) to (0x301 + m + n C 1) rxfifo octets rssi 1 lqi 1 2 fcs data payload (msdu) n m header (mhr) 1 frame length (m+n+2) fields removed by rxmac fields appended by rxmac from air to rxfifo octets 1 sfd 4 preamble frame length 1 rssi 1 rssi 1 shr phr phy payload psdu 5 - 127 downloaded from: http:///
mrf24j40 ds39776c-page 108 preliminary ? 2010 microchip technology inc. 3.11.1 reception modes the mrf24j40 can be configured for one of three different reception modes as shown in table 3-13 . an explanation of each of the modes follows. table 3-13: reception modes receive mode rxmcr (0x00<1:0>) normal 00 (default) error 10 promiscuous 01 3.11.1.1 normal mode normal mode accepts only packets with a good crc and satisfies the requirem ents of the ieee 802.15.4 specification, section 7.5.6.2 reception and rejection: 1. the frame type subfield of the frame control field shal l not contain an illegal frame type. 2. if the frame type indicates that the frame is a bea con frame, the source pan identifier shall match macpanid unless macpanid is equal to 0xffff, in which case, the beacon frame will be accepted regardless of the source pan identifier. 3. if a destination pan identifier is included in the f rame, it shall match macpanid or shall be the broadcast pan identifier (0xffff). 4. if a short destination address is included in the fra me, it shall match either macshortaddress or the broadcast address (0xffff). otherwise, if an extended destination address is included in the frame, it shall match aextendedaddress . 5. if only source addressing fields are included in a dat a or mac command frame, the frame shall be accepted only if the device is a pan coordinator and the source pan identifier matches macpanid . 3.11.1.2 error mode error mode accepts packets with good or bad crc. 3.11.1.3 promiscuous mode promiscuous mode accepts all packets with a good crc. 3.11.2 frame format filter once the packet has been accepted, depending on the reception mode above, the frame format is filtered according to ta b l e 3-14 . command, data or beacon only frames can be filtered and placed in the rxfifo buf fer. all frames (default) can be selected placing all frame formats (command, data and beacon) in the rxfifo. table 3-14: frame format filter filter mode rxflush (0x0d<3:1>) all frames 000 (default) command only 100 data only 010 beacon only 001 3.11.3 acknowledgment request if the received packet has the acknowledgment request bit set to 1 (bit 5 of the frame control field C refer to ieee 802.15.4 standard, section 7.2.1.1 frame control field), th e txmac circuitry will send an acknowledgment packet automatically. this feature minimizes the processing duties of the host micro - controller and keeps the acknowledgment timing within the ieee 802.15.4 s pecification. the sequence number field of the acknowledgment fra me will contain the value of the sequence number of the received frame for which the acknowledgment is to be sent. refer to section 3.13 acknowledgement for more information. 3.11.4 receive interrupt once the packet is accepted, depending on the recep - tion mode (normal, error or promiscuous) and frame f ormat (all, command, data or beacon), it is placed in the rxfifo buffer and a receive interrupt (rxif 0x31<3>) is issued. note: the intstat (0x31) register clears-to-zero upon read. therefore, the host microcontroller should read and store the intstat register and check the bits to determine which interrupt occurred. refer to section 3.3 interrupts for more information. data is placed into the rxfifo buffer as shown in figure 3-9 . the host processor reads the rxfifo via the spi port by reading a ddresses, 0x300-0x38f. address, 0x300, contains the received packet frame length which includes the header length, data payload length, plus 2 for the fcs bytes. an lqi and rssi value comes after the fcs. refer to section 3.6 received signal strength indicator (rssi)/energy detection (ed) and section 3.7 link quality indication (lqi) for more information. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 109 mrf24j40 the rxfifo is a 128-byte dual port buffer. the rxmac circuitry places the packet into the rxfifo sequentially, byte by byte, using an internal pointer. the internal pointer is reset one of three ways: 1. when the host microcontroller reads the first byt e of the packet. 2. manually by setting the rxflush (0x0d<0>) bit . the bit is automatically cleared to 0 by hardware. 3. software reset (see section 3.1 reset for more information). the rxfifo can only hold one packet at a time. it is hi ghly recommended that the host microcontroller read the entire rxfifo without interruption so that received packets are not missed. note: when the first byte of the rxfifo is read, the mrf24j40 is ready to receive the next packet. to avoid receiving a packet while the rxfifo is being read, set the receive decode inversion (rxdecinv) bit (0x39<2>) to 1 to disable the mrf24j40 from receiving a packet off the air. once the data is read from the rxfifo, the rxdecinv should be cleared to 0 to enable packet reception. example 3-2 shows example steps to read the rxfifo. example 3-2: steps to read rxfifo 3.11.5 security if the received packet has the security enabled bit set to 1 (bit 3 of the frame control field; refer to ieee 802.15.4 s tandard, section 7.2.1.1 frame control field) a security interrupt (secif 0x 31<4>) is issued. the host microcontroller can then decide to decrypt or ignore the packet. see section 3.17 security for more information. table 3-15: registers asso ciated with reception addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x00 rxmcr r r noackrsp r pancoord coord errpkt promi 0x0d rxflush r wakepol wakepad r cmdonly dataonly bcnonly rxflush 0x2a softrst r r r r r rstpwr rstbb rstmac 0x31 instat slpif wakeif hsymtmrif secif rxif txg2if txg1if txnif 0x32 intcon slpie wakeie hsymtmrie secie rxie txg2ie txg1ie txnie 0x39 bbreg1 r r r r r rxdecinv r r example steps to read the rxfifo: 1. receive rxif interrupt. 2. disable host microcontroller interrupts. 3. set rxdecinv = 1 ; disable receiving packets off air. 4. read address, 0x300; get rxfifo frame length value. 5. read rxfifo addresses, 0x301 through (0x300 + fram e length + 2); read packet data plus lqi and rssi. 6. clear rxdecinv = 0 ; enable receiving packets. 7. enable host microcontroller interrupts. downloaded from: http:///
mrf24j40 ds39776c-page 110 preliminary ? 2010 microchip technology inc. 3.12 transmission ieee 802.15.4 standard defines four frame types: acknowledgment, data, beacon and mac command frame. the transmission of the acknowledgment frame is handled automatically in hardware by the mrf24j40 and is covered in section 3.13 acknowledgement . hardware management of the transmission of data, beacon and mac command frames are handled in four transmit (tx) fifos. each tx fifo has a specific purpose depending on if the mrf2 4j40 is configured for beacon or non - beacon-enabled mode. configuring the mrf24j40 for beacon-enabled network operation is covered in section 3.8.1 beacon-enabled network . configuring the mrf24j40 for nonbeacon-enabled network operation is covered in section 3.8.2 nonbeacon-enabled network . the four tx fifos are: tx normal fifo C used for the transmission of data and mac command frames during the contention access phase (cap) of the superframe if the device is operating in beacon-enabled mode and for all transmissions when the device is operating in nonbeacon-enabled mode. tx beacon fifo C used for the transmission of the bea con frames. tx gts1 fifo and tx gts2 fifo C used for the tra nsmission of data during the contention free period (cfp) of the superframe if the device is operating in beacon-enabled mode. refer to section 3.8.1 beacon-enabled network for more information about guaranteed time slots in beacon-enabled mode. figure 3-10 summarizes the memory map for each of the tx fifos. each tx fifo occupies 128 bytes of memory and can ho ld one frame at a time. figure 3-11 shows the flow of data from the tx fifo to on air packet and summarizes the data, beacon and mac co mmand frames. figure 3-10: memory map of tx fifos long address memory space 128 bytes tx normal fifo tx beacon fifo tx gts1 fifo tx gts2 fifo 128 bytes128 bytes 128 bytes 0x000 0x07f 0x080 0x0ff 0x100 0x17f 0x180 0x1ff downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 111 mrf24j40 figure 3-11: packet transmission header payload tx fifo data frame format msdu mfr psdu phy packet structure shr phr phy payload ppdu on air packet octets n m 1 1 header length (m) frame length (m + n) header data payload mac command frame format beacon frame format 4 preamble 1 sfd 1 frame length 8 C 127 octets fcs octets 2 msdu mfr n C m C k C 2 beacon payload mhr frame control sequence number addressing fields 2 1 4 C 10 superframe specification 2 gts fields k pending address fields m octets 2 fcs msdu command payload command type mhr frame control sequence number addressing fields 2 1 4 C 20 1 n C 1 mfr octets 2 fcs mhr frame control sequence number addressing fields 2 1 4 C 20 data payload n fields appended by tx baseband fields appended by txmac from tx fifo to air downloaded from: http:///
mrf24j40 ds39776c-page 112 preliminary ? 2010 microchip technology inc. 3.12.1 tx fifos frame structure the tx fifos are divided into four fields: header length C used primarily in security mode and cont ains the length, in octets (bytes), of the mac header (mhr). in unsecure mode, this field is ignored. note: the header length field as implemented in the mrf24j40 is 5-bits long. therefore, the header length maximum value is 31 octets (bytes). frame length C contains the length, in octets (bytes), of the mac header (mhr) and data payload. header C contains the mac header (mhr). payload C contains the data payload. when the individual tx fifo is triggered, the mrf2 4j40 will handle transmitting the packet using the csma-ca algorithm, acknowledgment of the packet (optional), retransmit if acknowledgment not received within required time period and interframe spacing. the mrf24j40 will add the synchronization header (shr), phy header (phr) and frame check sequence (fcs) automatically. if a packet is to be transmitted using in-line security, the message integrity code (mic) will be appended in the data payload by the mrf24j40. refer to section 3.17 security for more information about transmitting and receiving data in securit y mode. in beacon-enabled mode, the mrf24j40 will handle superframe timing, transmission of the beacon and data packets during cap and cfp. 3.12.2 tx normal fifo in beacon-enabled mode, the tx normal fifo is used for the transmission of data and mac command frames during the contention access phase (cap) of the superframe. in nonbeacon-enabled mode, the tx normal fifo is used for all transmissions. to transmit a packet in the tx normal fifo, perform t he following steps: 1. the host processor loads the tx normal fifo with ieee 802.15.4 comp liant data or mac command frame using the format shown in figure 3-12 . figure 3-12: tx normal fifo format packet structure octets n m 1 1 header length (m) frame length (m + n) header payload 0x000 0x001 0x002 C (0x002 + m C 1) (0x002 + m) C (0x002 + m + n C 1) tx normal fifo memory address 2. if the packet requires an acknowledgment, the acknowledgment request bit in the frame control field should be set to 1 in the mac header (mhr) when the host microcontroller loads the tx normal fifo, and set the txnackreq (txncon 0x1b<2>) bit = 1 . refer to section 3.13 acknowledgement for more information about acknowledgment configuration. 3. if the frame is to be encrypted, the security ena bled bit in the frame control field should be set to 1 in the mac header (mhr) when the host microcontroller loads the tx normal fifo, and set the txnsecen (txncon 0x1b<1>) bit = 1 . refer to section 3.17 security for more information about security modes. 4. transmit the packet by setting the txntrig (txnc on 0x1b<0>) bit = 1 . the bit will be automatically cleared by hardware. 5. a txnif (intstat 0x31<0>) interrupt will be i ssued. the txnstat (txstat 0x24<0>) bit indicates the status of the transmission: txnstat = 0 : transmission was successful txnstat = 1 : transmission failed, retry count exceeded the number of retries of the most recent t ransmission is contained in the txnretry (txstat 0x24<7:6>) bits. the ccafail (txstat 0x24<5>) bit = 1 indicates if the failed transmission was due to the channel busy (csma-ca timed out). downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 113 mrf24j40 3.12.3 tx beacon fifo in beacon-enabled mode, the tx beacon fifo is used for the transmission of beacon frames during the beacon slot of the superframe. in nonbeacon-enabled mode, the tx beacon fifo is used for the transmission of a beacon frame at the time it is triggered (transmitted). to transmit a packet in the tx beacon fifo, perform t he following steps: 1. the host processor loads the tx beacon fifo with an ieee 802.15.4 compliant beacon frame using the format shown in figure 3-13 . figure 3-13: tx beacon fifo format packet structure octets n m 1 1 header length (m) frame length (m + n) header payload 0x080 0x081 0x082 C (0x082 + m C 1) (0x082 + m) C (0x082 + m + n C 1) tx beacon fifo memory address 2. if the beacon frame is to be encrypted, the security enabled bit in the frame control field should be set to 1 in the mac header (mhr) when the host microcontroller loads the tx beacon fifo, and set the txbsecen (txbcon 0x1a<1>) bit = 1 . refer to section 3.17 security for more information about security modes. 3. transmit the packet by setting the txbtrig (t xbcon 0x1a<0>) bit = 1 . the bit will be auto - matically cleared by hardware. if the mrf24j40 is con figured for beacon-enabled mode, the beacon frame will be transmitted at the beacon slot time at the beginning of the superframe. in nonbeacon-enabled mode, the beacon frame is transmitted at the time of triggering. downloaded from: http:///
mrf24j40 ds39776c-page 114 preliminary ? 2010 microchip technology inc. 3.12.4 tx gtsx fifo in beacon-enabled mode, the tx gtsx fifos are used for the transmission of data or mac command frames during the cfp of the superframe. refer to section 3.8.1 beacon-enabled network for more information about guaranteed time slots in beacon -enabled mode. to transmit a packet in the tx gtsx fifo, perform the f ollowing steps: 1. the host processor loads the respective tx gtsx fifo with an ieee 802.15.4 compliant data or mac command frame using the format shown in figure 3-14 . figure 3-14: tx gts1 and gts2 fifos format packet structure octets n m 1 1 header length (m) frame length (m + n) header payload 0x100 0x101 0x102 C (0x102 + m C 1) (0x102 + m) C (0x102 + m + n C 1) tx gts1 fifo memory address 0x180 0x181 0x182 C (0x182 + m C 1) (0x182 + m) C (0x182 + m + n C 1) tx gts2 fifo memory address 2. if the packet requires an acknowledgment, the acknowledgment request bit in the frame control field should be set to 1 in the mac header (mhr) when the host microcontroller loads the respective tx gtsx fifo, and set the txg1ackreq (txg1con 0x1c<2>) or txg2ackreq (txg2con 0x1d<2>) bit = 1 . refer to section 3.13 acknowledgement for more information about acknowledgment conf iguration. 3. program the number of retry times for the re spective tx gtsx fifo in the txg1retry (txg1con 0x1c<7:6>) or txg2retry (txg2con 0x1d<7:6>) bits. 4. if the frame is to be encrypted, the security enabled bit in the frame control field should be set to 1 in the mac header (mhr) when the host microcontroller loads the tx gtsx fifo, and set the txg1secen (txg1con 0x1c<1>) or txg2secen (txg2con 0x1d<1>) bit = 1 . refer to section 3.17 secu - rity for more information about security modes. 5. program the slot number for the respective tx gt sx fifo in the txg1slot (txg1con 0x1c<5:3> or txg2slot (txg2con 0x1d<5:3>) bits. 6. transmit the packet in the respective tx gtsx fi fo by setting the txg1trig (txg1con 0x1c<0>) or txg2trig (txg2con 0x1d<0>) bit = 1 . the bit will be automatically cleared by hardware. the packet will be transmitted at the corresponding slot time of the superframe. 7. a txg1if (intstat 0x31<1>) or txg2if (i ntstat 0x31<2>) interrupt will be issued. the txg1stat (txstat 0x24<1>) or txg2stat (txstat 0x24<2>) bit indicates the status of the transmission: txgxstat = 0: transmission was successful txgxstat = 1: transmission failed, retry coun t exceeded the number of retries of the most recent t ransmission is contained in the txg1retry (txg1con 0x1c<7:6>) or txg2retry (txg2con 0x1d<7:6>) bits. the ccafail (txstat 0x24<5>) bit = 1 indicates if the failed transmission was due to the channel busy (csma-ca timed out). the txg1fnt (txstat 0x24<3>) or txg2fnt (txstat 0x24<4>) bit = 1 i ndicates if the tx gtsx fifo transmis - sion failed due to not enough time to transmit in t he guaranteed time slot. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 115 mrf24j40 table 3-16: registers associated with transmission addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x1a txbcon0 r r r r r r txbsecen txbtrig 0x1b txncon r r r fpstat indirect txnackreq txnsecen txntrig 0x1c txg1con txg1retry1 txg1retry0 txg1slot2 txg1slot1 txg1slot0 txg1ackreq txg1secen txg1trig 0x1d txg2con txg2retry1 txg2retry0 txg2slot2 txg2slot1 txg2slot0 txg2ackreq txg2secen txg2trig 0x24 txstat txnretry1 txnretry0 ccafail txg2fnt txg1fnt txg2stat txg1stat txnstat 0x31 intstat slpif wakeif hsymtmrif secif rxif txg2if txg1if txnif 0x32 intcon slpie wakeie hsymtmrie secie rxie txg2ie txg1ie txnie downloaded from: http:///
mrf24j40 ds39776c-page 116 preliminary ? 2010 microchip technology inc. 3.13 acknowledgement an acknowledgment frame is used for confirming successful frame reception. the successful reception of a data or mac command frame can be optionally confirmed with an acknowledgment frame. if the originator does not receive an acknowledgment after, at most macackwaitduration (54) symbols, it assumes that the transmission was unsuccessful and retries the frame transmission. the turnaround time from the reception of the packet to the transmission of the acknowledgment shall be less than aturnaroundtime (12) symbols. acknowledgment frames are sent without using a csma-ca mechanism. refer to ieee 802.15.4-2003 standard, section 7.5.6.4 use of acknowledgments for more information. the mrf24j40 provides hardware support for: acknowledgment request C originator acknowledgment request C recipient reception of acknowledgment with frame pending bit transmission of acknowledgment with frame pending bit these features are explained below. 3.13.1 acknowledgment request C originator a data or mac command frame, transmitted by an originator with the acknowledgment request subfield in its frame control field set to 1 , shall be acknowledged by the recipient. the originator shall wait for at most macackwaitduration (54) symbols for the corresponding acknowledgment frame to be received. if an acknowledgment is received, the transmission is successful. if an acknowledgment is not received, the originator shall conclude that the transmission failed. if the transmission was direct, the originator shall retrans - mit the data or mac command frame and wait. if an acknowledgment is not received after amaxframeretries (3) transmissions, the originator shall assume the transmission has failed and notify the upper layers of the failure. the mrf24j40 features hardware retransmit. it will automatically retransmit the packet if an acknowledg - ment has not been received. the acknowledgment request bit in the frame control field should be pro - grammed into the transmit fifo of interest and the applicable xackreq bit should be set: txnackreq (txncon 0x1b<2>) C when the tx normal fifo transmits a frame, an acknowledgment frame is expected. if an acknowledgment is not received, retransmit. txg1ackreq (txg1con 0x1c<2>) C when the tx gts1 fifo transmits a frame, an acknowledgment frame is expected. if an acknowledgment is not received, retransmit. txg2ackreq (txg2con 0x1d<2>) C when the tx gts2 fifo transmits a frame, an acknowledgment frame is expected. if an acknowledgment is not received, retransmit. when the frame is transmitted, the mrf24j40 will expect an acknowledgment frame within macackwaitduration . if an acknowledgment is not received, it will retransmit amaxframeretries . the macackwaitduration value can be programmed by the mawd (acktmout 0x12<6:0>) bits. the amaxframeretries value is a constant and not configurable. the number of retry times of the most recent txnfifo transmission can be read in the txnretry (txstat 0x24<7:6>) bits. the number of retry times for the tx gts1 fifo and tx gts2 fifo can be programmed or read in the txg1retry (txg1con 0x1c<7:6>) and txg2retry (txg2con 0x1d<7:6>) bits. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 117 mrf24j40 3.13.2 acknowledgment request C recipient the mrf24j40 features hardware automatic acknowl - edgment. it will automatically acknowledge a frame if th e received frame has the acknowledgment request subfield in the frame control field set to 1 . this will maintain the rx-tx timing requirements of the ieee 802.15.4 specification. automatic acknowledgment is enabled by clearing the noackrsp (rxmcr 0x00<5>) bit = 0 . to disable automatic acknowledgment, set the noackrsp (rxmcr 0x00<5>) bit = 1 . the transmission of an acknowledgment frame in a non beacon-enabled network, or in the cfp, shall commence aturnaroundtime (12) symbols after the reception of the data or mac command frame. the transmission of an acknowledgment frame in the cap shall commence at a backoff slot boundary. in this case, the transmission of an acknowledgment frame shall commence between aturnaroundtime and ( aturnaroundtime + aunitbackoffperiod ) symbols after the reception of the data or mac command frame. the ieee 802.15.4 specification defines a turnaroundtime as a constant value of 12 symbol periods. the aturnaroundtime can be programmed by the turntime (txtime 0x27<7:4>) and rfstbl (txstbl 0x2e<7:4>) bits where aturnaroundtime = turntime + rfstbl. 3.13.3 reception of acknowledgment with frame pending bit the status of the frame pending bit in the frame control field of the received acknowledgment frame is reflected in the fpstat (txncon 0x1b<4>) bit. 3.13.4 transmission of acknowledgment with frame pending bit the frame pending bit in the frame control field of an acknowledgment frame indicates that a device has additional data to send to the recipient following the current transfer. refer to ieee 802.15.4-2003 standard, section 7.2.1.1.3 frame pending subfield. acknowledgment of a data request mac command C in respo nse to a data request mac command, if the mrf24j40 has additional (pending) data, it can set the frame pending bit of the acknowledgment frame by set - ting drpack (acktmout 0x12<7>) = 1 . this wi ll only set the frame pending bit for an acknowledgment of a data request mac command. table 3-17: registers associated with acknowledgement addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x00 rxmcr r r noackrsp r pancoord coord errpkt promi 0x12 acktmout drpack mawd6 mawd5 mawd4 mawd3 mawd2 mawd1 mawd0 0x1b txncon r r r fpstat indirect txnackreq txnsecen txntrig 0x1c txg1con txg1retry1 txg1retry0 txg1slot2 txg1slot1 txg1slot0 txg1ackreq txg1secen txg1trig 0x1d txg2con txg2retry1 txg2retry0 txg2slot2 txg2slot1 txg2slot0 txg2ackreq txg2secen txg2trig 0x21 txpend mlifs5 mlifs4 mlifs3 mlifs2 mlifs1 mlifs0 gtsswitch fpack 0x24 txstat txnretry1 txnretry0 ccafail txg2fnt txg1fnt txg2stat txg1stat txnstat 0x27 txtime turntime3 turntime2 turntime1 turntime0 r r r r 0x2e txstbl rfstbl3 rfstbl2 rfstbl1 rfstbl0 msifs3 msifs2 msifs1 msifs0 downloaded from: http:///
mrf24j40 ds39776c-page 118 preliminary ? 2010 microchip technology inc. 3.14 battery monitor the mrf24j40 provides a battery monitor feature to monitor the system supplied voltage. a threshold volt - age level (batth) can be se t and the system supplied voltage can be monitored by the battery low indicator (batind) to determine if the voltage is above or below the threshold. the following steps set the threshold and enable battery monitoring: 1. set the battery monitor threshold (batth) volt age in the rfcon5 (0x205<7:4>) register. 2. enable battery monitoring by setting baten = 1 in the rfcon6 (0x206<3>) register. 3. periodically, monitor the battery low indicator (ba tind) bit in the rxsr (0x30<5>) register to determine if the system s upply voltage is above or below the battery monitor threshold (batth). table 3-18: registers associated with power management addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x30 rxsr r upsecerr batind r r secdecerr r r 0x205 rfcon5 batth3 batth2 batth1 batth0 r r r r 0x206 rfcon6 txfil r r 20mrecvr baten r r r downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 119 mrf24j40 3.15 sleep the mrf24j40 can be placed into a low-current sleep mode. during sleep, the 20 mhz main oscillator is turned off, disabling the rf, baseband and mac circuitry. data is retained in the control and fifo registers and the mrf24j40 is accessible via the spi port. there are two sleep modes: timed sleep mode immediate sleep and wake mode 3.15.1 timed sleep mode the timed sleep mode uses several counters to time events for the sleep and wake-up of the mrf24j40. the following sections cover sleep clock generation, calibration and counters. 3.15.1.1 sleep clock generation figure 3-15 shows the sleep clock generation circuitry. the sleep clock (slpclk) frequency is selectable be tween a 100 khz internal oscillator or a 32 khz external crystal oscillator. the sleep clock enable (slpclken) bit in the slpcon0 (0x211<0>) register can enable (slpclken = 0 ; default setting) or disable (slpclken = 1 ) the sleep clock oscillators. the slpclk frequency can be further divided by the sleep clock divisor (slpclkdiv) 0x220<4:0> bits. the slpclk frequency can be calibrated; the procedure is listed in section 3.15.1.2 sleep clock calibration below. figure 3-15: sleep clock generation sleep clock divisor (slpclkdiv<4:0>) lposc1 lposc2 0110 slpclk 32 khz external oscillator 100 khz internal oscillator en en mainclk sleep calibration counter (slpcal<19:0>) count 16 slpclk periods slpclksel (rfcon7 0x207<7:6>) slpclken (slpcon0 0x211<0>) slpcalen (slpcal2 0x20b<4>) slpcalrdy (slpcal2 0x20b<7>) the 100 khz internal oscillator requires no external components. however, it is not as accurate or stable as the 32 khz external crystal oscillator. it is recom - mended that it be calibrated before use. see section 3.15.1.2 sleep clock calibration below for the sleep clock calibration procedure. to select the 100 khz internal oscillator as the source of slpclk, set the slpclksel bi ts (rfcon7 0x207<7:6> to 10 ) the 32 khz external crystal oscillator provides better f requency accuracy and stability than the 100 khz internal oscillator. the 32 khz external crystal oscillator external circuitry is explained in detail in section 2.7 32 khz external crystal oscillator . to select the 32 khz extern al cryst al oscillator as the source of slpclk, set th e slpclksel bits (rfcon7 0x207<7:6>) to 01 . downloaded from: http:///
mrf24j40 ds39776c-page 120 preliminary ? 2010 microchip technology inc. 3.15.1.2 sleep clock calibration the slpclk frequency is calibrated by a 20-bit slpcal register clocked by the 20 mhz main oscillator (50 ns period). sixteen samples of the slpclk are counted and stored in the slpcal register. to perform slpclk calibration: 1. select the source of slpclk. 2. begin calibration by setting the slpcalen bit (slpcal2 0x20b<4>) to 1 . sixteen samples of the slpclk are counted and stored in the slpcal register. 3. calibration is complete when the slpcalrdy bit (slpcal2 0x20b<7>) is set to 1 . the 20-bit slpcal value is contained in registers, slpcal2, slpc al1 and slpcal0 (0x20b<3:0>, 0x20a and 0x209). the sleep clock period is calculated as shown in equation 3-1 . equation 3-1: the slpclk frequency can be slowed by setting the sleep clock division (slpclkdiv) bits (slpcon1 0x220<4:0>). 3.15.1.3 sleep mode counters figure 3-16 shows the sleep mode counters. a summary of the counters are: main counter (0x229<1:0>, 0x228, 0x227, 0x226) C a 26-b it counter clocked by slpclk. together with the remain counter times events as listed in ta b l e 3-19 . remain counter (0x225, 0x224) C a 16-bit counter clocked by mainclk. together with the main counter times events as listed in ta b l e 3-19 . wake time (0x223<2:0>, 0x222) C an 11-bit value that is compared with the main counter value to signal the time to enable (wake-up) the 20 mhz main oscillator. table 3-20 gives the recommended values for waketime depending on the slpclk frequency. wake count (0x36<4:3>, 0x35<6:0>) C a 9-bit counter clocked by slpclk. during the time the wake counter is counting, the 20 mhz main oscillator is starting up, stabilizing and disabled to the rf, baseband and mac circuitry. the recommended wake count period is 2 ms to allow the 20 mhz main oscillator to stabilize. table 3-20 gives the recommended values for wakecnt depending on the slpclk frequency. table 3-19: main and remain counter timed events mode timed event beacon-enabled coordinator beacon interval (bi) beacon-enabled device inactive period nonbeacon-enabled coo rdinator or device sleep interval table 3-20: wake time and wake count recommended values slpclk source slpclkdiv waketime (2.1 ms) wakecnt (2 ms) 100 khz 0x01 0x0d2 0x0c8 32 khz 0x00 0x045 0x042 p slpcal = slpcal * 50 ns/16 downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 121 mrf24j40 figure 3-16: sleep mode counters 20 mhz main oscillator compare wake time (waketime<10:0>) osc1 osc2 en slpclk startcnt (maincnt3 0x229<7>) beacon-enabled mode (bo ? 15, slotted = 1 ) wake count (wakecnt<8:0>) en mainclk wakeif wakecnt = 0 mainclk slpack (slpack 0x35<7>) wakeifie beacon interval (beacon-enabled coordinator) inactive period (beacon-enabled device) maincnt = 0 remcnt = 0 slpclk main counter (maincnt<25:0>) en remain counter (remcnt<15:0>) en nonbeacon-enabled mode (bo = 15, slotted = 0 ) downloaded from: http:///
mrf24j40 ds39776c-page 122 preliminary ? 2010 microchip technology inc. beacon-enabled coordinator mode C figure 3-17 shows the sleep time line for beacon-enabled coordi - nator mode. in this mode, the sum of the main and remain counters is the beacon interval (bi) of the superframe. the mrf24j40 will transmit a beacon packet as per beacon interval shown in equation 3-2 . equation 3-2: the mrf24j40 alerts the host processor on the bound - ary of the active and inactive portion via a sleep alert int errupt (slpif 0x31<7>). the host microcontroller acknowledges the interrupt (slpack 0x35<7>), at which time, the mrf24j40 turns off the 20 mhz main oscillator. as the main counter counts, when waketime = maincnt, the 20 mhz main oscillator is turned on. the wake counter counts as the 20 mhz main oscillator stabilizes and mainclk is disabled. the mrf24j40 alerts the host processor with a wake-up alert interrupt (0x31<6>). figure 3-17: beacon-enabled coordinator sleep time line beacon beacon beacon interval (bi) active portion inactive portion superframe duration (sd) main counter counts low-current sleep period wake counter counts (~2 ms) time 20 mhz main oscillator turned off 20 mhz main oscillator stable sleep acknowledge slpack (0x35<7>) sleep alert interrupt slpif (0x31<7>) remain counter counts remain counter counts wake-up alert interrupt wakeif (0x31<6>) waketime = maincnt 20 mhz main oscillator turned on beacon interval = (mainc nt * slpclk period) + (remcnt * 50 ns) downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 123 mrf24j40 beacon-enabled device mode C figure 3-18 shows the sleep time line for beacon-enabled device mode. in this mode, the sum of the main and remain counters is the inactive period of the superframe. the mrf24j40 will time the inactive period as shown in equation 3-3 . equation 3-3: the mrf24j40 alerts the host processor on the bound - ary of the active and inactive portion via a sleep alert int errupt (slpif 0x31<7>). the host microcontroller acknowledges the interrupt (slpack 0x35<7>), at which time, the mrf24j40 turns off the 20 mhz main oscillator. as the main counter counts, when waketime = maincnt, the 20 mhz main oscillator is turned on. the wake counter counts as the 20 mhz main oscillator stabilizes. the mrf24j40 alerts the host processor with a wake-up alert interrupt (0x31<6>). figure 3-18: beaco n-enabled device sleep time line beacon beacon beacon interval (bi) active portion inactive portion superframe duration (sd) main counter counts low-current sleep period time 20 mhz main oscillator turned off 20 mhz main oscillator stable sleep acknowledge slpack (0x35<7>) sleep alert interrupt slpif (0x31<7>) remain counter counts remain counter counts wake counter counts (~2 ms) wake-up alert interrupt wakeif (0x31<6>) waketime = maincnt 20 mhz main oscillator turned on inactive period = (maincnt * slpclk period) + (remcnt * 50 ns) downloaded from: http:///
mrf24j40 ds39776c-page 124 preliminary ? 2010 microchip technology inc. nonbeacon-enabled (coordinator or device) mode C figure 3-19 shows the sleep time line for non - beacon-enabled (coordinator or device) mode. in this mode, the host processor puts the mrf24j40 to sleep by setting the startcnt (0x229<7>) bit. at the end of the sleep interval, the mrf24j40 alerts the host processor with a wake-up alert interrupt (0x31<6>). equation 3-4: figure 3-19: nonbeacon-enabled (coo rdina tor or device) sleep time line main counter counts low-current sleep period time 20 mhz main oscillator turned off 20 mhz main oscillator stable remain counter counts remain counter counts wake counter counts (~2 ms) wake-up alert interrupt wakeif (0x31<6>) waketime = maincnt 20 mhz main oscillator turned on sleep interval = (maincnt * slpclk period) C waketime + [(remcnt * 50 ns)/2] downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 125 mrf24j40 3.15.2 immediate sleep and wake-up mode in the immediate sleep and wake-up mode, the host microcontroller places the mrf24j40 to sleep and wakes it up. to enable the immediate wake-up mode, set the immwake (0x22<7>) bit to 1 . to place the mrf24j40 to sleep immediately, perform the following two steps: 1. perform a power management reset by setting the rstpwr (0x2a<2>) bit to 1 . the bit will be automatically cleared to 0 by hardware. 2. put the mrf24j40 to sleep immediately by set - ting the slpack (0x35<7>) bit to 1 . the bit will be automatically cleared to 0 by hardware. wake-up can be performed in one of two methods: 1. wake-up on wake pin 15. to enable the wake pin, set the wakepad (0x0d<5>) bit to 1 and set the wake pin polarity. set the wakepol (0x0d<7>) bit to 1 for active-high signal, or clear to 0 for active-low signal. or 2. wake-up on register. to wake up the mrf24j40 from sleep via the spi port, set the regwake (0x22<6>) bit to 1 and then clear to 0 . after wake-up, delay at least 2 ms to allow 20 mhz main oscillator time to stabilize before transmitting or receiving. example 3-3 summarizes the steps to prepare the mrf24j40 for wake-up on wake pin and placing to sleep. example 3-3: immediate sleep and wake the steps to prepare the mrf24j40 for immediate sleep and wake up on wake pin p repare wake pin: 1. wake pin = low 2. rxflush (0x0d) = 0x60 C enable w ake pin and set polarity to active-high 3. wakecon (0x22) = 0x80 C enable immediate wake-up mode p ut to sleep: 4. softrst (0x2a) = 0x04 C perform a power management reset 5. slpack (0x35) = 0x80 C put mrf24j40 to sleep immediately to wa k e : 6. wake pin = high C wake-up 7. rfctl (0x36) = 0x04 - rf state machine reset 8. rfctl (0x36) = 0x00 9. delay 2 ms to allow 20 mhz main oscillator time to stabilize before transmitting o r receiving. downloaded from: http:///
mrf24j40 ds39776c-page 126 preliminary ? 2010 microchip technology inc. table 3-21: registers associated with sleep addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x0d rxflush r wakeplol wakepad r cmdonly dataonly bcnonly rxflush 0x22 wakecon immwake regwake intl intl intl intl intl intl 0x2a softrst r r r r r rstpwr rstbb rstmac 0x31 instat slpif wakeif hsymtmrif secif rxif txg2if txg1if txnif 0x32 intcon slpie wakeie hsymtmrie secie rxie txg2ie txg1ie txnie 0x35 slpack slpack wakecnt6 wakecnt5 wakecnt4 wakecnt3 wakecnt2 wakecnt1 wakecnt0 0x36 rfctl r r r wakecnt8 wakecnt7 rfrst rftxmode rfrxmode 0x207 rfcon7 slpclksel1 slpclksel0 r r r r r r 0x20b slpcal2 slpcalrdy r r slpcalen slpcal19 slpcal18 slpcal17 slpcal16 0x211 slpcon0 r r r r r r intedge slpclken 0x220 slpcon1 r r clkouten slpclkdiv4 slpclkdiv3 slpclkdiv2 slpclkdiv1 slpclkdiv0 0x223 waketimeh r r r r r waketime10 waketime9 waketime8 0x224 remcntl remcnt7 remcnt6 remcnt5 remcnt4 remcnt3 remcnt2 remcnt1 remcnt0 0x225 remcnth remcnt15 remcnt14 remcnt13 remcnt12 remcnt11 remcnt10 remcnt9 remcnt8 0x226 maincnt0 maincnt7 maincnt6 maincnt5 maincnt4 maincnt3 maincnt2 maincnt1 maincnt0 0x227 maincnt1 maincnt15 maincnt14 maincnt13 maincnt12 maincnt11 maincnt10 maincnt9 maincnt8 0x228 maincnt2 maincnt23 maincnt22 maincnt21 maincnt20 maincnt19 maincnt18 maincnt17 maincnt16 0x229 maincnt3 startcnt r r r r r maincnt25 maincnt24 downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 127 mrf24j40 3.16 mac timer many features of the ieee 802.15.4-2003 standard are based on a symbol period of 16 s. a 16-bit mac timer is provided to generate interrupts configurable in multiples of 8 s. the mac timer begins counting down when a value is written to the hsymtmrh (0x29) reg - ister. a hsymtmrif (0x31<5>) interrupt is generated whe n the count reaches zero. table 3-22: registers associated with the mac timer addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x28 hsymtmrl hsymtmr7 hsymtmr6 hsymtmr5 hsymtmr4 hsymtmr3 hsymtmr2 hsymtmr1 hsymtmr0 0x29 hsymtmrh hsymtmr15 hsymtmr14 hsymtmr13 hsymtmr12 hsymtmr11 hsymtmr10 hsymtmr9 hsymtmr8 0x31 instat slpif wakeif hsymtmrif secif rxif txg2if txg1if txnif 0x32 intcon slpie wakeie hsymtmrie secie rxie txg2ie txg1ie txnie downloaded from: http:///
mrf24j40 ds39776c-page 128 preliminary ? 2010 microchip technology inc. 3.17 security the mrf24j40 provides a hardware security engine that implements the advanced encryption standard, 128-bit (aes-128) according to the ieee 802.15.4-2003 standard. the mrf24j40 supports seven security suites which provide a group of security operations designed to provide security services on mac and upper layer frames. aes-ctr aes-ccm-128 aes-ccm-64 aes-ccm-32 aes-crc-mac-128 aes-crc-mac-64 aes-crc-mac-32 security keys are stored in th e security key fifo. four security keys, three for encryption and one for decryption, are stored in the memory locations shown in figure 3-20 . the security engine can be used for the encryption and decryption of mac sublayer frames for transmission and reception of secured frames and provide security encryption and decryption services to the upper layers. these functions are described in the following subsections. 3.17.1 mac sublayer transmit encryption a frame can be encrypted and transmitted from each of the tx fifos. table 3-23 lists the tx fifo and associ - ated security key memory address and control register bits. figure 3-20: memory map of security key fifo long address memory space 16 bytes tx normal fifo security key tx gts1 fifo security key tx gts2 fifo/ tx beacon fifo security key rx fifo security key 16 bytes 16 bytes 16 bytes 0x280 0x28f 0x290 0x29f 0x2a0 0x2af 0x2b0 0x2bf note: the tx gts2 fifo and tx beacon fifo share the same security key memory location. table 3-23: encryption security key and control register bits tx fifo security key memory address security suite sel ect bits security enable bits trigger bit tx normal fifo 0x280-0x28f txncipher (seccon0 0x2c<2:0>) txnsecen (txncon 0x1b<1>) txntrig (txncon 0x1b<0>) tx gts1 fifo 0x290-0x29f txg1cipher (seccr 2 0x37<2:0>) txg1secen (txg1con 0x1c<1>) txg1trig (txg1con 0x1c<0>) tx gts2 fifo 0x2a0-0x2af txg2cipher (seccr 2 0x37<5:3>) txg2secen (txg2con 0x1d<1>) txg2trig (txg2con 0x1d<0>) tx beacon fifo 0x2a0-0x2af txbcipher (sec con1 0x2d<6:4>) txbcnsecen (txbcon 0x1a<1>) txbcntrig (txbcon 0x1a<0>) note: the tx gts2 fifo and tx beacon fifo share the same security key memory location. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 129 mrf24j40 to transmit a secured frame, perform the following steps: 1. the host processor loads one of the four tx fifos with an ieee 802.15 .4 compliant frame to be encrypted using the format shown in figure 3-21 . figure 3-21: security tx fifo format fields appended by txmac integrity code mhr msdu mfr fcs frame control sequence number addressing fields 2 1 4 C 20 4 1 n C 5 octets 2 4/8/16 frame counter key sequence counter encrypted payload header tx fifo octets n m 1 1 header length (m) frame length (m + n) header data payload mac sublayer encryption (transmit) 2. program the corresponding tx fifo 128-bit security key into the se curity key fifo memory address, as shown in ta b l e 3-23 . 3. select the security su ite for the corresponding tx f ifo and program the security select bits as shown in table 3-23 . the security suite selection values are shown in table 3-24 . table 3-24: security suite selection value mode security suite select bits (s ee table 3-23 ) none 000 aes-ctr 001 aes-ccm-128 010 aes-ccm-64 011 aes-ccm-32 100 aes-cbc-mac-128 101 aes-cbc-mac-64 110 aes-cbc-mac-32 111 4. encrypt and transmit the packet by setting the securit y enable (txxsecen) = 1 and trigger (txxtrig) bits = 1 for the respective tx fifo, as shown in ta b l e 3-23 . 5. depending on which tx fifo the secure packet was transmit from, the status of the transmission is read as, tx normal fifo C a txnif (intstat 0x31<0>) inter - rupt will be issued. the txnstat (txstat 0x24<0>) bi t indicates the status of the transmission: txnstat = 0 : transmission was successful txnstat = 1 : transmission faile d, retry count exceeded the number of retries of the most recent transmission is co ntained in the txnretry (txstat 0x24<7:6>) bits. the ccafail (txstat 0x24<5>) bit = 1 indicates if the failed transmission was due to the channel busy (csma-ca timed out). tx gtsx fifo C a txg1if (intstat 0x31<1>) or txg2if (intstat 0x31<2>) interrupt will be issued. the txg1stat (txstat 0x24<1>) or txg2stat (txstat 0x24<2>) bit indicates the status of the transmission: txgxstat = 1 : transmission was successful txgxstat = 0 : transmission failed, retry count exceeded the number of retries of the most recent transmission is con tained in the txg1retry (txg1con 0x1c<7:6>) or txg2retry (txg2con 0x1d<7:6>) bits. the ccafail (txstat 0x24<5>) bit = 1 indicates if the failed transmission was due to the channel busy (csma-ca timed out). the txg1fnt (txstat 0x24<3>) or txg2fnt (txstat 0x24<4>) bit = 1 indicates if tx gtsx fifo transmission failed due to not enough time to transmit in the guaranteed time slot. downloaded from: http:///
mrf24j40 ds39776c-page 130 preliminary ? 2010 microchip technology inc. 3.17.2 mac sublayer receive decryption to receive and decrypt a secured frame from the rxfifo, perform the following steps: 1. when a packet is received and the security ena ble bit = 1 in the frame control field, the mrf24j40 issues a security interrupt, secif (intstat 0x31<4>). the security interrupt indicates to the host microcontroller that the received frame was se cured. the host micro - controller can choose to decrypt or ignore the f rame. the format of the received frame is shown in example 3-22 . figure 3-22: security rx fifo format rxfifo address: (0x301 + m + n) to (0x301 + m + n + 1) (0x301 + m + n + 2) (0x301 + m + n + 3) 0x300 0x301 to (0x301 + m C 1) (0x301 + m) to (0x301 + m + n C 1) rxfifo octets rssi 1 lqi 1 2 fcs data payload (msdu) n m header (mhr) 1 frame length (m+n+2) 2. if the decryption should be ignored, set the secignore (seccon0 0x2c<7>) bit = 1 . the encrypted packet can be discarded or read from the rxfifo and processed in the upper layers. 3. the host microcontroller loads the security key in to the rx fifo security key memory location as shown in ta b l e 3-25 . table 3-25: decryption security key and control register bits fifo security key memory addre ss rx fifo 0x2b0-0x2bf 4. select the security suite and program the rxcipher (seccon0 0 x2c<5:3>) bits. the security suite selection values are shown in table 3-24 . 5. start the decryption by setting the secstart (seccon0 0x2c<6>) bit = 1 . 6. when the decryption process is complete, a rece ive interrupt (rxif 0x31<3>) is issued. 7. check the decryption status by reading secdecerr (rxsr 0x30<2>) secdecerr = 0: no decryption error secdecerr = 1: decryption error note: if decryption error has occurred and the packet in the fifo needs to be discarded, then set rxflush (rxflush 0x0d<0>) bit = 1 . downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 131 mrf24j40 3.17.3 upper layer encryption to encrypt an upper layer frame, perform the following steps: 1. the host microcontroller loads the txnfifo wit h the upper layer frame for encryption into the txnfifo using the format shown in figure 3-23 . the header length field indicates the number of octets (bytes) that is not encrypt ed. note: the header length field, as implemented in the mrf24j40, is 5 bits long. therefore, the header length maximum value is 31 octets (bytes). this conforms to the i eee 802.15.4-2003 specification. how - ever, it does not conform to the ieee 802.15.4-2006 standard. the work arou nd is to: - use a header length no longer than 31 octets (bytes) - implement a security algorithm in the up per layers figure 3-23: upper layer encr yption and decryption format header tx fifo octets n m 1 1 header length (m) frame length (m + n) header data payload upper layer security header mn o c t e t s upper layer encrypted payload upper layer encryption 2. the host microcontroller loads the 13-byte nonce value into the upnonce12 through upnonce0 (0x240 through 0x24c) registers. 3. program the 128-bit security key into the tx normal f ifo security key fifo memory address, 0x280 through 0x28f. 4. select the security suite and program the txnc ipher (seccon0 0x2c<2:0>) bits. the security suite selection values are shown in table 3-24 . 5. enable upper layer security encryption mode by setting the upenc (seccr2 0x37<6>) bit = 1 . 6. encrypt the frame by setting the txntrig (txnc on 0x1b<0>) bit and txnsecen (txncon 0x1b<1>) to 1 . 7. a txnif (intstat 0x31<0>) interrupt will be issu ed. the txnstat (txstat 0x24<0>) bit = 0 indicates the encryption has completed. 8. the encrypted frame is available in the t xnfifo and can be read by the host microcontroller. application hint: the encryption can be checked by decrypting the frame data (refer section 3.17.4 upper layer decryption ) and comparing it to the original frame data. downloaded from: http:///
mrf24j40 ds39776c-page 132 preliminary ? 2010 microchip technology inc. 3.17.4 upper layer decryption to decrypt an upper layer frame, perform the following steps: 1. the host microcontroller loads the txnfifo wit h the upper layer frame for decryption into the txnfifo using the format shown in figure 3-23 . the header length field indicates the number of octets (bytes) that are not encrypt ed. 2. the host microcontroller loads the 13-byte non ce value into the upnonce12 through upnonce0 (0x240 through 0x24c) registers. note: the header length field, as implemented in the mrf24j40, is 5-bits long. therefore, the header length maximum value is 31 octets (bytes). this conforms to the ieee 802.15.4-2003 specification. how - ever, it does not conform to the ieee 802.15.4-2006 standard. the work arou nd is to: - use a header length no longer than 31 octets (bytes) - implement a security algorithm in the upp er layers 3. program the 128-bit security key into the tx normal fifo security key fifo memory address, 0x280 through 0x28f. 4. select the security suite and program the t xncipher (seccon0 0x2c<2:0>) bits. the security suite selection values are shown in table 3-24 . 5. enable upper layer security decryption mode by setting the updec (seccr2 0x37<7>) bit = 1 . 6. start decrypting the frame by setting the txn trig (txncon 0x1b<0>) bit to 1 . 7. a txnif (intstat 0x31<0>) interrupt will be issu ed. the txnstat (txstat 0x24<0>) bit = 0 indicates that the decryption process has completed. 8. check if a mic error occurred by reading the upsecerr (0x30<6>) bit: upsecerr = 0 : no mic error upsecerr = 1 : mic error occurred; write 1 to clear error 9. the decrypted frame is availab le in the txnfifo and can be read by the host microcontroller. table 3-26: registers a ssociated with security addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x1a txbcon0 r r r r r r txbsecen txbtrig 0x1b txncon r r r fpstat indirect txnackreq txnsecen txntrig 0x1c txg1con txg1retry1 txg1retry0 txg1slot2 txg1slot1 txg1slot0 txg1ackreq txg1secen txg1trig 0x1d txg2con txg2retry1 txg2retry0 txg2slot2 txg2slot1 txg2slot0 txg2ackreq txg2secen txg2trig 0x24 txstat txnretry1 txnretry0 ccafail txg2fnt txg1fnt txg2stat txg1stat txnstat 0x2c seccon0 secignore secstart rxcipher2 rxcipher1 rxcipher0 txncipher2 txncipher1 txncipher0 0x2d seccon1 r txbcipher2 txbcipher1 txbcipher0 r r disdec disenc 0x30 rxsr r upsecerr batind r r secdecerr r r 0x31 intstat slpif wakeif hsymtmrif secif rxif txg2if txg1if txnif 0x32 intcon slpie wakeie hsymtmrie secie rxie txg2ie txg1ie txnie 0x37 seccr2 updec upenc txg2cipher2 txg2cipher1 txg2cipher0 txg1cipher2 txg1cipher1 txg1cipher0 0x240 upnonce0 upnonce<7:0> 0x241 upnonce1 upnonce<15:8> 0x242 upnonce2 upnonce<23:16> 0x243 upnonce3 upnonce<31:24> 0x244 upnonce4 upnonce<39:32> 0x245 upnonce5 upnonce<47:40> 0x246 upnonce6 upnonce<55:48> 0x247 upnonce7 upnonce<63:56> 0x248 upnonce8 upnonce<71:64> 0x249 upnonce9 upnonce<79:72> 0x24a upnonce10 upnonce<87:80> 0x24b upnonce11 upnonce<95:88> 0x24c upnonce12 upnonce<103:96> downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 133 mrf24j40 3.18 turbo mode the mrf24j40 provides a turbo mode to transmit and receive at 625 kbps (2.5 times 250 kbps). this mode enables higher data rates for proprietary protocols. to configure the mrf24j40 for turbo mode, perform th e following steps: 1. enable turbo mode by setting the turbo (bbreg0 0x3 8<0>) bit = 1 . 2. set the baseband parameter, prevalidth (bbr eg3 0x3b<7:4>) bits = 0011 . 3. set baseband parameter, csth (bbreg4 0x3c <7:5>) bits = 010 . 4. perform a baseband circuitry reset, rstbb (sof trst 0x2a<1>) = 1 . table 3-27: registers associated with turbo mode addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x2a softrst r r r r r rstpwr rstbb rstmac 0x38 bbreg0 r r r r r r r turbo 0x3b bbreg3 prevalidth3 prevalidth2 prevalidth1 prevalidth0 predetth2 predetth1 predetth0 r 0x3c bbreg4 csth2 csth1 csth0 precnt2 precnt1 precnt0 r r downloaded from: http:///
mrf24j40 ds39776c-page 134 preliminary ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 135 mrf24j40 4.0 applications 4.1 antenna/balun figure 4-1 is an example of the circuit diagram of a balun to match to a 50 antenna. a balun is the imped - ance transformer from unbalanced input of the pcb ant enna and the balanced input of the rf transceiver (pins rfp and rfn). figure 4-2 shows the measured impedance of the balun where the center of the band is very close to 50 . when using low tolerance components (i.e., 5%) along with an appropriate ground, the impedance will remain close to the 50 measurement. figure 4-1: example balun circuit diagram 50 ant 0.3 pf l4 4.7 nh 0.5 pf c15 0.5 pf l3 5.6 nh c14 0.5 pf c12 0.01 f 0.5 pf rfp rfn 10 nh 10 nh c17 c16 l1 c2 +v l2 figure 4-2: balun circuit measured impedance downloaded from: http:///
mrf24j40 ds39776c-page 136 preliminary ? 2010 microchip technology inc. 4.2 external pa/lna control external pa, lna and rf switches can be controlled by the mrf24j40 internal rf state machine. figure 4-3 shows a typical application circuit with external pa, lna and rf switches. setting testmode (0x22f<2:0>) bits to 111 will configure pins, gpio0, gpio1 and gpio2, to operate according to ta b l e 4-1 . the external pa/lna timing diagram is shown in figure 4-4 . table 4-1: gpio external pa/lna signaling gpio receive transmit maximum cu rrent source gpio0 low high 4 ma gpio1 low high 1 ma gpio2 high low 1 ma figure 4-3: external pa/lna block diagram mrf24j40 gpio0 gpio1 gpio2 antenna balun rfprfn pa enable lna enable lna pa rf switch rf switch downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 137 mrf24j40 figure 4-4: external pa/lna timing diagram gpio0 gpio1 gpio2 rf stabilization time (t rfstbl ) = rfstbl * 16 s transmit on time (t txon ) = txonts * 16 s + txont * 50 ns pa on time (t paon ) = paonts * 16 s + paont + 50 ns time 144 s = 9 * 16 s 98 s = 6 * 16 s + 40 * 50 ns 18.05 s = 1 * 16 s + 41 * 50 ns rule: t rfstbl > t txon > t paon receive transmit t rfstbl 144 s beginning of packet beginning of transmit t txon 98 s t paon 18 s table 4-2: registers associated with external pa/lna addr. name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x15 symtickh txont6 txont5 txont4 txont3 txont2 txont1 txont0 tickp8 0x16 pacon0 paont7 paont6 paont5 paont4 paont3 paont2 paont1 paont0 0x17 pacon1 r r r paonts3 paonts2 paonts1 paonts0 paont8 0x18 pacon2 fifoen r txonts3 txonts2 txonts1 txonts0 txont8 txont7 0x2e txstbl rfstbl3 rfstbl2 rfstbl1 rfstbl0 msifs3 msifs2 msifs1 msifs0 0x22f testmode r r r rssiwait1 rssiwait0 testmode2 testmode1 testmode0 downloaded from: http:///
mrf24j40 ds39776c-page 138 preliminary ? 2010 microchip technology inc. 4.3 pcb layout design the following guidelines are intended to aid users in high-frequency pcb layout design. the printed circuit board is comprised of four basic fr4 la yers: signal layout, rf ground, power line routing and ground (see figure 4-5 ). the guidelines will explain the requirements of these layers. figure 4-5: four basic copper fr4 layers dielectric = 4.5, thickness = 7 mils signal layout, thickness = 1.8 mils rf ground, thickness = 1.2 mils dielectric = 4.5, thickness = 19 mils power line routing, thickness = 1.2 mils dielectric = 4.5, thickness = 7 mils ground, thickness = 1.8 mils note: care should be taken with all gr ound lines to prevent breakage. it is important to keep the original pcb thickness since any change will affect antenna performance (see total thickness of dielectric) or microstrip lines characteristic impedance. the first layer width of a 50 characteristic impedance microstrip line is 12 mils. avoid having microstrip lines longer than 2.5 cm, since t hat line might get very close to a quarter wave length of the working frequency of the board which is 3.0 cm, and start behaving as an ant enna. except for the antenna layout, avoid sharp corners since they can act as an antenna. round corners will eliminate possible future emi problems. digital lines by definition are prone to be very noi sy when handling periodic waveforms and fast clock/switching rates. avoi d laying out a rf signal close to any digital lines. a via filled ground patch underneath the ic tr ansceiver is mandatory. a power supply must be distributed to each pin in a st ar topology and low-esr capacitors must be placed at each pin for proper decoupling noise. thorough decoupling on each power pin is be neficial for reducing in-band transceiver noise, particularly when this noise degrades perfor - mance. usually, low value caps (27-47 pf) combin ed with large value caps (100 nf) will cover a large spectrum of frequency. passive components (inductors) must be in the hi gh-frequency category and the srf (self-resonant frequency) should be at least two times higher than the operating frequency. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 139 mrf24j40 4.4 mrf24j40 schematic and bill of materials 4.4.1 schematic figure 4-6: mrf24j40 schematic v dd 1 rfp 2 rfn 3 v dd 4 v dd 5 gnd 6 gpio0 7 gpio1 8 gpio5 9 gpio4 10 nc 30 nc 29 lposc1 28 lposc2 27 nc 26 gnd 25 gnd 24 nc 23 gnd 22 v dd 21 ic1 gpio2 11 gpio3 12 reset 13 gnd 14 wake 15 int 16 sdo 17 sdi 18 sck 19 cs 20 4039 38 37 36 35 34 33 32 31 lcap v dd nc v dd gnd v dd osc1 ocs2 v dd v dd mrf24j40/ml nc ncnc nc nc nc c10 47 pf v in c11 0.1 f v in l2 10 nh l1 10 nh v in c2 0.5 pf l3 5.6 nh c14 0.5 pf c13 47 pf c12 0.01 f c15 0.5 pf c16 0.5 pf c17 0.3 pf l4 4.7 nh v in reset int wake sdi sck cs oe a v in gnd y v cc 1 2 ic2 nc7sz125p5x sdo 3 5 4 c3 0.01 f v in r1 np c6 47 pf v in c447 pf v in c547 pf v in c18 18 pf c19 18 pf x1 20.00 mhz c9 100 pf c7 0.01 f v in c8 1 f v in note: np = not placed. 0.01 f 50 antenna nc downloaded from: http:///
mrf24j40 ds39776c-page 140 preliminary ? 2010 microchip technology inc. 4.4.2 bill of materials table 4-3: mrf24j40 bill of material s designator description c2 chip capacitor 0402 cog 0.5p c3 chip capacitor 0402 x7r 10n c4 chip capacitor 0402 cog 47p c5 chip capacitor 0402 cog 47p c6 chip capacitor 0402 cog 47p c7 chip capacitor 0402 x7r 10n c8 chip capacitor 0402 x5r 1u c9 chip capacitor 0402 cog 100p c10 chip capacitor 0402 cog 47p c11 chip capacitor 0402 x5r 100n c12 chip capacitor 0402 x5r 100n c13 chip capacitor 0402 cog 47p c14 chip capacitor 0402 cog 0.5p c15 chip capacitor 0402 cog 0.5p c16 chip capacitor 0402 cog 0.5p c17 chip capacitor 0402 cog 0.3p c18 chip capacitor 0402 cog 18p c19 chip capacitor 0402 cog 18p ic1 mrf24j40-i/ml ic2 buffer, sc70 package, nc7sz125p5x l1 chip inductor 0402 10n l2 chip inductor 0402 10n l3 chip inductor 0402 5.6n l4 chip inductor 0402 4.7n r1 not placed x1 20 mhz crystal, abracon p/n abm8 - 156 - 20.000mhz - t downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 141 mrf24j40 5.0 electrical characteristics absolute maximum ratings (?) ambient temperature under bias..................................................................................... ............ ............. -40c to +85c storage temperature ..................................................................................................... ....... . ................. -65c to +150c voltage on any combined digital and analog pin with respect to v ss (except v dd )........................ -0.5v to (v dd + 0.5v) voltage on v dd with respect to v ss ............................................................................................................ -0.3v to 3.6v maximum output current sunk by gpio1-gpio5 pins ........................................................................... ..... . .............1 ma maximum output current sourced by gpio1-gpio5 pins ................................................................ ............. . ...........1 ma maximum output current sunk by gpio0 pin ...................................................................................... . .. ...................4 ma maximum output current sourced by gpio0 pin ................................................................................. ... ... ................4 ma ? notice: stresses above those listed under absolute maximum ratings may cause permanent damage to the device. this is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied. exposure to maximum rating conditions for extended periods may affect device reliability. downloaded from: http:///
mrf24j40 ds39776c-page 142 preliminary ? 2010 microchip technology inc. table 5-1: parameters min typ max units ambient operating temperature -40 +85 c supply voltage for rf, analog and digital circuits 2.4 3.6 v supply voltage for digital i/o 2.4 3.3 3.6 v input high voltage (v ih ) 0.5 x v dd v dd + 0.3 v input low voltage (v il ) -0.3 0.2 x v dd v recommended operating conditions table 5-2: current consumption typical values: t a = 25c, v dd = 3.3v chip mode condition min typ max units sleep sleep clock disabled 2 a tx at maximum output power 23 ma rx 19 ma table 5-3: receiver ac characteristics typical values: t a = 25c, v dd = 3.3v, lo frequency = 2.445 ghz parameters condition min typ max units rf input frequency 2.405 2.480 ghz rf sensitivity at antenna input with o-qpsk signal and 3.5 db front end loss is assumed -95 dbm maximum rf input lna at high gain +5 dbm lo leakage measured at balun matching network inpu t at frequency 2.405-2.48 ghz -60 dbm noise figure (including matching) 8 db adjacent channel reje ction @ +/- 5 mhz 30 db alternate channel reje ction @ +/- 10 mhz 40 db rssi range 50 db rssi error -5 5 db downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 143 mrf24j40 table 5-4: transmitter ac characteristics typical values: t a = 25c, v dd = 3.3v, lo frequency = 2.445 ghz parameters condition min typ max units rf carrier frequency 2.405 2.480 ghz maximum rf output power 0 dbm rf output power control range 36 db tx gain control resolution programmed by register 1.25 db carrier suppression -30 dbc tx spectrum mask for o-qpsk sign al offset frequency > 3.5 mhz, at 0 dbm output power -33 dbm tx evm 13 % figure 5-1: example spi slave mode timing cs scksdo 82 sdi 74 msb bit 6 - - - - - - 1 lsb msb in bit 6 - - - - 1 lsb in 80 70 table 5-5: example spi slave mode requirements param no. symbol characteristic min max units conditions 70 t ss l2 sc h cs to sck input 50 ns 71 t sc h sck input high time single byte 50 ns 72 t sc l sck input low time single byte 50 ns 74 t sc h2 di l hold time of sdi data input to sck edge 25 ns 75 t do r sdo data output rise time 25 ns 76 t do f sdo data output fall time 25 ns 78 t sc r sck output rise time (master mode) 25 ns 80 t sc h2 do v, t sc l2 do v sdo data output valid after sck edge 50 ns 82 t ss l2 do v sdo data output valid after cs edge 50 ns 83 sc l2 ss h cs after sck edge 50 ns t downloaded from: http:///
mrf24j40 ds39776c-page 144 preliminary ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 145 mrf24j40 6.0 packaging information 6.1 package marking information xxxxxxxxxx 40-lead qfn xxxxxxxxxxxxxxxxxxxx yywwnnn mrf24j40 example -i/ml 0810017 legend: xx...x product-specific information y year code (last digit of calendar year) yy year code (last 2 digits of calendar year) ww week code (week of january 1 is week 01) nnn alphanumeric traceability code pb-free jedec designator for matte tin (sn) * this package is pb-free. the pb-free jedec designator ( ) can be found on the outer packaging for this package. note: in the event the full microchip part num ber cannot be marked on one line, it will be carried over to the next line, thus limiting the number of available characters for customer-specific information. 3 e 3 e 3 e downloaded from: http:///
mrf24j40 ds39776c-page 146 preliminary ? 2010 microchip technology inc. 6.2 package details the following sections give the technical details of the packages. 40-lead plastic quad flat, no lead package (ml) 6x6x0.9 mm body [qfn] with 0.40 mm contact length notes: 1. pin 1 visual index feature may vary, but must be located within the hatched area. 2. package is saw singulated. 3. dimensioning and tolerancing per asme y14.5m. bsc: basic dimension. theoretically exact value shown without tolerances. ref: reference dimension, usually without tolerance, for information purposes only. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging units millimeters dimension limits min nom max number of pins n 40 pitch e 0.50 bsc overall height a 0.80 0.90 1.00 standoff a1 0.00 0.02 0.05 contact thickness a3 0.20 ref overall width e 6.00 bsc exposed pad width e2 4.50 4.65 4.80 overall length d 6.00 bsc exposed pad length d2 4.50 4.65 4.80 contact width b 0.18 0.25 0.30 contact length l 0.30 0.40 0.50 contact-to-exposed pad k 0.20 d exposed pad d2 e e2 21 n note 1 a a1 a3 top view bottom view k l n b e 2 1 microchip technology drawing c04-118c downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 147 mrf24j40 appendix a: revision history revision b (october 2008) rewritten the entire data sheet. revision c (august 2010) this document includes the updated technical information. downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 148 mrf24j40 notes: downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 149 mrf24j40 index a absolute maximum ratings ............................................. 135 ac characteristics receiver ................................................................... 136 transmitter ............................................................... 137 acknowledgement ............................................................ 112 associated registers ............................................... 113 antenna/balun ................................................................. 129 applications ...................................................................... 129 external pa/lna control ......................................... 130 b battery monitor ................................................................. 114 beacon-enabled network .................................................. 93 bill of materials ................................................................. 134 block diagrams 20 mhz main oscillator crystal circuit ........................ 8 32 khz external oscillator crystal circuit .................... 9 beacon-enabled coordinator sleep time line ........ 118 beacon-enabled device sleep time line ............... 119 example circuit ........................................................ 129 external pa/lna ...................................................... 130 ieee 802.15.4 phy packet and mac frame structure ................................................... 4 interrupt logic ............................................................ 87 mrf24j40 architecture ............................................... 6 nonbeacon-enabled (coordinator or device) sleep time line ............................................... 120 sleep clock generation ........................................... 115 sleep mode counters .............................................. 117 superframe structure ................................................. 94 wireless node .............................................................. 3 ccca associated registers ................................................. 89 mode 1 ....................................................................... 89 mode 2 ....................................................................... 89 mode 3 ....................................................................... 89 channel selection .............................................................. 88 associated registers ................................................. 88 clear channel assessment (cca) .................................... 89 control register description .............................................. 14 control registers mapping, long address ............................................. 14 mapping, short address ............................................ 14 csma-ca .......................................................................... 99 associated registers ............................................... 101 slotted mode ............................................................ 100 unslotted mode .......................................................... 99 current consumption ....................................................... 136 customer change notification service ............................ 146 customer notification service .......................................... 146 customer support ............................................................ 146 d device overview ............................................................ 3, 85 e electrical characteristics .................................................. 135 energy detection (ed) ....................................................... 90 errata ................................................................................... 2 example spi slave mode requirements ......................... 137 external pa/lna associated registers ............................................... 131 g generation ....................................................................... 115 gtsfifo state diagram ................................................... 95 h hardware description .......................................................... 5 i ieee 802.15.4-2003 standard ............................................. 4 impedance measured ................................................................. 129 initialization ........................................................................ 86 associated registers ................................................. 86 interframe spacing (ifs) ................................................. 102 associated registers ............................................... 102 internet address .............................................................. 146 interrupts ........................................................................... 87 l link quality indication (lqi) .............................................. 93 long address control register summary ......................... 16 m mac timer ....................................................................... 122 associated registers ............................................... 122 memory map ...................................................................... 11 memory organization ........................................................ 11 long address register interface ............................... 13 short address register interface .............................. 12 microchip internet web site ............................................. 146 n nonbeacon-enabled network ............................................ 93 o oscillator 100 khz internal .......................................................... 9 20 mhz main ............................................................... 8 23 khz external crystal ............................................... 8 p packaging ........................................................................ 139 details ...................................................................... 140 marking .................................................................... 139 pcb layout design .......................................................... 132 phase-locked loop (pll) ................................................... 8 pin descriptions ................................................................... 7 cs (serial interface enable) ........................................ 7 gnd (ground, digital circuit) ...................................... 7 gnd (ground, pll) ..................................................... 7 gnd (guard ring ground) .......................................... 7 gpio0 (external pa enable) ....................................... 7 gpio1 (external tx/rx switch control) ..................... 7 gpio2 (external tx/rx switch control) ..................... 7 gpio3 (general purpose digital i/o) .......................... 7 gpio4 (general purpose digital i/o) .......................... 7 gpio5 (general purpose digital i/o) .......................... 7 int (interrupt pin) ........................................................ 7 lcap (pll loop filter external capacitor) ................. 7 lposc1 (32 khz crystal input) ................................... 7 lposc2 (32 khz crystal input) ................................... 7 nc (no connection) .................................................... 7 downloaded from: http:///
mrf24j40 ds39776c-page 150 preliminary ? 2010 microchip technology inc. osc1 (20 mhz crystal input) ...................................... 7 osc2 (20 mhz crystal input) ...................................... 7 reset (global hardware reset active-low) .............. 7 rfn (differential rf pin, negative) ............................. 7 rfp (differential rf pin, positive) ............................... 7 sck (serial interface clock) ........................................ 7 sdi (serial interface data input) .................................. 7 sdo (serial interface data output) ............................. 7 v dd (charge pump power supply) .............................. 7 v dd (digital circuit power supply) ............................... 7 v dd (guard ring power supply) .................................. 7 v dd (pll power supply) .............................................. 7 v dd (power supply, anal og circuit) ............................. 7 v dd (power supply, band gap reference circuit) ................................................ 7 v dd (rf power supply) ............................................... 7 v dd (vco supply) ....................................................... 7 wake (external wake-up trigger) .............................. 7 pins general purpose input/output (gpio) ......................... 9 interrupt (int) .............................................................. 9 reset (reset ) ............................................................ 9 serial peripheral interface (spi) ................................ 10 wake (wake) .............................................................. 9 power and ground pins ....................................................... 8 power management associated registers ............................................... 114 proprietary protocols miwi ............................................................................. 1 miwi p2p ..................................................................... 1 zigbee .......................................................................... 1 proprietary wireless networking protocols .......................... 1 r reader response ............................................................ 147 received signal strength indicator (rssi) ........................ 90 reception ......................................................................... 103 acknowledgement request ..................................... 104 associated registers ............................................... 105 interrupt .................................................................... 104 modes ...................................................................... 104 error ................................................................. 104 normal ............................................................. 104 promiscuous .................................................... 104 recommended operating conditions .............................. 136 registers acktmout (mac ack time-out duration) ............. 27 assoeadr0 (associated coordinator extended address 0) ......................................... 72 assoeadr1 (associated coordinator extended address 1) ......................................... 72 assoeadr2 (associated coordinator extended address 2) ......................................... 73 assoeadr3 (associated coordinator extended address 3) ......................................... 73 assoeadr4 (associated coordinator extended address 4) ......................................... 74 assoeadr5 (associated coordinator extended address 5) ......................................... 74 assoeadr6 (associated coordinator extended address 6) ......................................... 75 assoeadr7 (associated coordinator extended address 7) ......................................... 75 assosadr0 (associated coordinator short address 0) ................................................ 76 assosadr1 (associated coordinator short address 1) ................................................ 76 bbreg0 (baseband 0) .............................................. 55 bbreg1 (baseband 1) .............................................. 55 bbreg2 (baseband 2) .............................................. 56 bbreg3 (baseband 3) .............................................. 56 bbreg4 (baseband 4) .............................................. 57 bbreg6 (baseband 6) .............................................. 57 ccaedth (energy detection threshold for cca) ............................................ 58 eadr0 (extended address 0) ................................... 21 eadr1 (extended address 1) ................................... 21 eadr2 (extended address 2) ................................... 21 eadr3 (extended address 3) ................................... 22 eadr4 (extended address 4) ................................... 22 eadr5 (extended address 5) ................................... 22 eadr6 (extended address 6) ................................... 23 eadr7 (extended address 7) ................................... 23 eslotg1 (gts1 and cap end slot) ....................... 28 eslotg23 (end slot of gts3 and gts2) ............... 35 eslotg45 (end slot of gts5 and gts4) ............... 35 eslotg67 (end slot of gts6) ................................. 35 frmoffset (superframe counter offset to align beacon) ................................................ 38 gateclk (gated clock control) .............................. 41 gpio (gpio port) ...................................................... 51 hsymtmrh (half symbol timer high byte) ............ 43 hsymtmrl (half symbol timer low byte) .............. 43 intcon (interrupt control) ........................................ 50 intstat (interrupt status) ........................................ 49 maincnt0 (main counter 0) .................................... 69 maincnt1 (main counter 1) .................................... 69 maincnt2 (main counter 2) .................................... 70 maincnt3 (main counter 3) .................................... 70 order (beacon and superframe order) ................. 25 pacon0 (power amplifier control 0) ........................ 30 pacon1 (power amplifier control 1) ........................ 30 pacon2 (power amplifier control 2) ........................ 31 panidh (pan id high byte) ..................................... 19 panidl (pan id low byte) ....................................... 19 remcnth (remain counter high) ........................... 68 remcntl (remain counter low) ............................ 68 rfcon0 (rf control 0) ............................................ 59 rfcon1 (rf control 1) ............................................ 59 rfcon2 (rf control 2) ............................................ 60 rfcon3 (rf control 3) ............................................ 60 rfcon5 (rf control 5) ............................................ 61 rfcon6 (rf control 6) ............................................ 61 rfcon7 (rf control 7) ............................................ 62 rfcon8 (rf control 8) ............................................ 62 rfctl (rf mode control) ........................................ 53 rfstate (rf state) ................................................. 65 rssi (averaged rssi value) .................................... 65 rxflush (receive fifo flush) ............................... 24 rxmcr (receive mac control) ................................ 18 rxsr (rx mac status) ............................................ 48 sadrh (short address high byte) ........................... 20 sadrl (short address low byte) ............................. 20 seccon0 (security control 0) ................................. 45 seccon1 (security control 1) ................................. 46 seccr2 (security control 2) .................................... 54 slpack (sleep acknowledgement and wake-up counter) ............................................. 52 slpcal0 (sleep calibration 0) ................................. 63 slpcal1 (sleep calibration 1) ................................. 63 downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 151 mrf24j40 slpcal2 (sleep calibration 2) ................................. 64 slpcon0 (sleep clock control 0) ............................ 66 slpcon1 (sleep clock control 1) ............................ 66 softrst (software reset) ...................................... 44 symtickh (symbol period tick high byte) ............. 29 symtickl (symbol period tick low byte) ............... 29 testmode (test mode) ........................................... 71 trisgpio (gpio pin direction) ................................ 51 txbcon0 (transmit beacon fifo control 0) ........... 32 txbcon1 (transmit beacon control 1) .................... 40 txg1con (gts1 fifo control) ............................... 34 txg2con (gts2 fifo control) ............................... 34 txmcr (csma-ca mode control) ............................ 26 txncon (transmit normal fifo control) ................ 33 txpend (tx data pending) ...................................... 36 txstat (tx mac status) ......................................... 39 txstbl (tx stabilization) ......................................... 47 txtime (tx turnaround time) ................................. 42 upnonce0 (upper nonce security 0) ..................... 77 upnonce1 (upper nonce security 1) ..................... 77 upnonce10 (upper nonce security 10) ................. 82 upnonce11 (upper nonce security 11) ................. 82 upnonce12 (upper nonce security 12) ................. 83 upnonce2 (upper nonce security 2) ..................... 78 upnonce3 (upper nonce security 3) ..................... 78 upnonce4 (upper nonce security 4) ..................... 79 upnonce5 (upper nonce security 5) ..................... 79 upnonce6 (upper nonce security 6) ..................... 80 upnonce7 (upper nonce security 7) ..................... 80 upnonce8 (upper nonce security 8) ..................... 81 upnonce9 (upper nonce security 9) ..................... 81 wakecon (wake control) ....................................... 37 waketimeh (wake-up time match value high) ........................................................ 67 waketimel (wake-up time match value low) ......................................................... 67 reset .................................................................................. 85 associated registers ................................................. 85 revision history ............................................................... 141 rf transceiver ................................................................ 129 rssi mode 1 ....................................................................... 90 mode 2 ....................................................................... 90 rssi/ed associated registers ................................................. 90 s schematic ........................................................................ 133 security ............................................................................ 123 mac sublayer receive decryption ......................... 125 mac sublayer transmit encryption ........................ 123 memory map ............................................................ 123 upper layer decryption ........................................... 127 upper layer encryption ........................................... 126 security associated registers ............................................... 127 setting up beacon-enabled/nonbeacon-enabled networks associated registers ................................................. 98 short address control register summary ......................... 15 sleep ............................................................................... 115 associated registers ............................................... 121 sleep timer beacon-enabled coordinator mode ........................ 118 beacon-enabled device mode ................................ 119 immediate sleep and wake-up mode ..................... 121 nonbeacon-enabled (coordinator or device) mode .................................................. 120 timed sleep mode .................................................. 115 ttiming diagrams example spi slave mode ........................................ 137 external pa/lna ...................................................... 131 long address read ................................................... 13 long address write ................................................... 13 short address read .................................................. 12 short address write .................................................. 12 spi port read (output) ............................................. 10 spi port write (input) ................................................ 10 transmission ................................................................... 106 associated registers ............................................... 111 turbo mode ..................................................................... 128 associated registers ............................................... 128 tx beacon fifo .............................................................. 109 tx fifos frame structure .............................................. 108 tx gtsx fifo ................................................................. 110 tx normal fifo .............................................................. 108 w www address ................................................................ 146 www, on-line support ...................................................... 2 downloaded from: http:///
mrf24j40 ds39776c-page 152 preliminary ? 2010 microchip technology inc. notes: downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 153 mrf24j40 the microchip web site microchip provides online support via our www site at www.microchip.com. this web site is used as a means to make files and information easily available to customers. accessible by using your favorite internet browser, the web site contains the following information: product support C data sheets and errata, application notes and sample programs, design resources, users guides and hardware support documents, latest software releases and archived software general technical support C frequently asked questions (faqs), technical support requests, online discussion groups, microchip consultant program member listing business of microchip C product selector and ordering guides, latest microchip press releases, listing of seminars and events, listings of microchip sales offices, distributors and factory representatives customer change notification service microchips customer notification service helps keep customers current on microchip products. subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. to register, access the microchip web site at www.microchip.com, click on customer change notification and follow the registration instructions. customer support users of microchip products can receive assistance through several channels: distributor or representative local sales office field application engineer (fae) technical support development systems information line customers should contact their distributor, representative or field application engineer (fae) for support. local sales offices are also available to help customers. a listing of sale s offices and locations is included in the back of this document. technical support is available through the web site at: http://suppo rt.microchip.com downloaded from: http:///
ds39776c-page 154 preliminary ? 2010 microchip technology inc. mrf24j40reader response it is our intention to provide you with the best documentation possible to ensure successful use of your microchip prod - uct. if you wish to provide your comments on organization, clarity, subject matter, and ways in which our documentation can better serve you, please fax your comments to t he technical publications manager at (480) 792-4150. please list the following information, and use this outli ne to provide us with your comments about this document. to : technical publications manager re: reader response total pages sent ________ from: name company address city / state / zip / country telephone: (_______) _________ - _________ application (optional): would you like a reply? y n device: literature number: questions: fax: (______) _________ - _________ ds39776c mrf24j40 1. what are the best features of this document? 2. how does this document meet your hardware and software development needs? 3. do you find the organization of this document easy to follow? if not, why? 4. what additions to the document do you think would enhance the structure and subject? 5. what deletions from the document could be made without affecting the overall usefulness? 6. is there any incorrect or misleading information (what and where)? 7. how would you improve this document? downloaded from: http:///
? 2010 microchip technology inc. preliminary ds39776c-page 155 mrf24j40 product identification system to order or obtain information, e.g., on pricing or de livery, refer to the factory or the listed sales office . part no. x /xx xxx pattern package temperature range device device mrf24j40: ieee 802.15.4? 2.4 ghz rf transceiver temperature range i = -40 c to +85 c (industrial) package ml = qfn (plastic quad flat, no lead) t = tape and reel example: a) mrf24j40-i/ml: industrial temperature, qfn package. b) mrf24j40t-i/ml: industrial temperature, qfn package, tape and reel. downloaded from: http:///
ds39776c-page 156 ? 2010 microchip technology inc. americas corporate office 2355 west chandler blvd. chandler, az 85224-6199 tel: 480-792-7200 fax: 480-792-7277 technical support: http://support.microchip.com web address: www.microchip.com atlanta duluth, ga tel: 678-957-9614 fax: 678-957-1455 boston westborough, ma tel: 774-760-0087 fax: 774-760-0088 chicago itasca, il tel: 630-285-0071 fax: 630-285-0075 cleveland independence, oh tel: 216-447-0464 fax: 216-447-0643 dallas addison, tx tel: 972-818-7423 fax: 972-818-2924 detroit farmington hills, mi tel: 248-538-2250 fax: 248-538-2260 kokomo kokomo, in tel: 765-864-8360 fax: 765-864-8387 los angeles mission viejo, ca tel: 949-462-9523 fax: 949-462-9608 santa clara santa clara, ca tel: 408-961-6444 fax: 408-961-6445 toronto mississauga, ontario, canada tel: 905-673-0699 fax: 905-673-6509 asia/pacific asia pacific office suites 3707-14, 37th floor tower 6, the gateway harbour city, kowloon hong kong tel: 852-2401-1200 fax: 852-2401-3431 australia - sydney tel: 61-2-9868-6733 fax: 61-2-9868-6755 china - beijing tel: 86-10-8528-2100 fax: 86-10-8528-2104 china - chengdu tel: 86-28-8665-5511 fax: 86-28-8665-7889 china - chongqing tel: 86-23-8980-9588 fax: 86-23-8980-9500 china - hong kong sar tel: 852-2401-1200 fax: 852-2401-3431 china - nanjing tel: 86-25-8473-2460 fax: 86-25-8473-2470 china - qingdao tel: 86-532-8502-7355 fax: 86-532-8502-7205 china - shanghai tel: 86-21-5407-5533 fax: 86-21-5407-5066 china - shenyang tel: 86-24-2334-2829 fax: 86-24-2334-2393 china - shenzhen tel: 86-755-8203-2660 fax: 86-755-8203-1760 china - wuhan tel: 86-27-5980-5300 fax: 86-27-5980-5118 china - xian tel: 86-29-8833-7252 fax: 86-29-8833-7256 china - xiamen tel: 86-592-2388138 fax: 86-592-2388130 china - zhuhai tel: 86-756-3210040 fax: 86-756-3210049 asia/pacific india - bangalore tel: 91-80-3090-4444 fax: 91-80-3090-4123 india - new delhi tel: 91-11-4160-8631 fax: 91-11-4160-8632 india - pune tel: 91-20-2566-1512 fax: 91-20-2566-1513 japan - yokohama tel: 81-45-471- 6166 fax: 81-45-471-6122 korea - daegu tel: 82-53-744-4301 fax: 82-53-744-4302 korea - seoul tel: 82-2-554-7200 fax: 82-2-558-5932 or 82-2-558-5934 malaysia - kuala lumpur tel: 60-3-6201-9857 fax: 60-3-6201-9859 malaysia - penang tel: 60-4-227-8870 fax: 60-4-227-4068 philippines - manila tel: 63-2-634-9065 fax: 63-2-634-9069 singapore tel: 65-6334-8870 fax: 65-6334-8850 taiwan - hsin chu tel: 886-3-6578-300 fax: 886-3-6578-370 taiwan - kaohsiung tel: 886-7-213-7830 fax: 886-7-330-9305 taiwan - taipei tel: 886-2-2500-6610 fax: 886-2-2508-0102 thailand - bangkok tel: 66-2-694-1351 fax: 66-2-694-1350 europe austria - wels tel: 43-7242-2244-39 fax: 43-7242-2244-393 denmark - copenhagen tel: 45-4450-2828 fax: 45-4485-2829 france - paris tel: 33-1-69-53-63-20 fax: 33-1-69-30-90-79 germany - munich tel: 49-89-627-144-0 fax: 49-89-627-144-44 italy - milan tel: 39-0331-742611 fax: 39-0331-466781 netherlands - drunen tel: 31-416-690399 fax: 31-416-690340 spain - madrid tel: 34-91-708-08-90 fax: 34-91-708-08-91 uk - wokingham tel: 44-118-921-5869 fax: 44-118-921-5820 w orldwide s ales and s ervice 07/15/10 downloaded from: http:///


▲Up To Search▲   

 
Price & Availability of MRF24J40MA

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X